Server Management
PEAR::Pager 使用上のTips 12/28/2008 22:39:41

Pagerは、検索結果を一定数のレコード毎に自動的にページ分割してくれる非常に便利なPEARライブラリだ。

しかし、標準仕様がJumpモード(ページ送りの最後になると次のページ送りが表示される)であることが気になる。Googleなどの検索結果の下部に表示されるパターンは、通常Slidingモードだ。

そして、Slidingモードの問題として、ページ送り数字のセパレーター間隔が妙に幅広く、10ページも表示させると横幅一杯になってしまう。

まずはseparatorのパラメーターを""(空)にして間を詰めたいのだが、それでも間が詰まらない。そこで、spacesBeforeSeparator [integer]、spacesAfterSeparator [integer]のパラメーターをそれぞれ1にすることで、ようやく間を詰める事ができた。

Number of spaces before the separator.

http://pear.php.net/package/Pager


Comments

Add comment for this article
Comment
URL
Password (You can revise your comment later with this password.)
Security Code
Input this text in the right textarea.
 



03enterprise

Copyright © Majestic, Inc. Privacy Policy