|
来源:http://trac.seagullproject.org/wiki/Howto/DB/ModifyingPagerAppearance 修改分页的外观一个直观的关于如何使Seagull为你分页的例子,请查看 code example. 有很多方法可以修改分页组件的外观,下面是一个关于如何为下一页/上一页使用图形按钮的例子。 // setting URL for link images in pager Bar $themePrefix = SGL_BASE_URL . '/themes/' . $_SESSION['aPrefs']['theme'] . '/images/'; $pager_options['firstPagePre'] = '<img src="' . $themePrefix . 'arrow_left.gif" /><img src="' . $themePrefix . 'arrow_left.gif" />'; $pager_options['firstPagePost'] = ''; $pager_options['prevImg'] = '<img src="' . $themePrefix . 'arrow_left.gif" />'; $pager_options['altPrev'] = 'previous page'; $pager_options['nextImg'] = '<img src="' . $themePrefix . 'arrow_right.gif" />'; $pager_options['altNext'] = 'next page'; $pager_options['lastPagePre'] = ''; $pager_options['lastPagePost'] = '<img src="' . $themePrefix . 'arrow_right.gif" /><img src="' . $themePrefix . 'arrow_right.gif" />'; 这个代码要添加到seagull/lib/SGL/DB:getPagedData(); 函数中。 |