On Mon, 05 Jan 2004 21:23:44 +0100, Sławomir Marcinkowski wrote:
Hello,
can someone show use example use smarty pager plugin? {pager
rowcount=$LISTDATA.rowcount limit=$LISTDATA.limit txt_first=$L_MORE
class_num="fl" class_numon="fl" class_text="fl"}
I'm fighing with it for 5 hours, and still don't have any results :(
Slawek,Poland
Never tried the pager plugin but have just written one myself that has a
heap of configurable options (not all required.. and simple to use). It's
a "first version hack" but appears to work as intended. I posted it
publically on the Smarty forum at:
<http://www.phpinsider.com/smarty-forum/viewtopic.php?t=1604>
Run-down of options for the params as per the comment and 2 quick examples:
* Param Options:
* --------------
* str page_file | Used for /foo.php?pg=1 style URIs
* int page | Current page: ?pg=1
* int max_items | Max items to display per page
* int total_items | Total number of items for displaying
* [str prev_image] | Optional path to image for 'Previous'
* [str next_image] | Optional path to image for 'Next'
* | Both of the above paths are relative to
* | the DOCUMENT_ROOT
* [str google_friendly] | Default: no (yes|no) Use 'foo.php/1'
* | rather than 'foo.php?pg=1'
* | (your code needs to use the correct
* | format itself to use this option.
* | ie: $_SERVER['PATH_INFO'])
* [str use_query_string] | Default: yes (yes|no) Whether or not
* | to use the query '/1' or '?pg=1' style
* | URIs or not. This option overrides
* | page_file if defined as "no"
* [str prev_page] | If not using the query_string method, you
* | can specify 'page2.php' for example
* [str next_page] | Likewise for prev_page, the next page can
* | also be defined.
*
*
* Example:
* --------
* {pagination page_file="/gallery.php" page=$page_num max_items=6 total_items=$total_items prev_image="/graphics/prev.png" next_image="/graphics/next.png" google_friendly="yes"}
*
* {pagination page=$page_num max_items=6 total_items=$total_items
use_query_string="no" prev_page="/page1.php" next_page="/page3.php"}
Hope this is of some use to someone =)
Regards,
Ian
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.