473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Smarty and pager plugin

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

Jul 17 '05 #1
1 7164
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.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian | last post by:
Hello, I am trying to work out how to have smarty use a string's contents as the display-> template.. ie: $smarty->display($buffer); obviously $buffer isn't a filename, but a smarty template...
1
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
1
by: Jim Red | last post by:
Hello I have a Smarty(.php.net) Question. I want to create a Navigation with a Smarty Template. How can I display an Array recursively? Do I have to write a Plugin?
2
by: M | last post by:
Hi Folks, I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS v6 The following PHP File: <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
0
by: Matt | last post by:
geez, i've done this a million times, you'd think i could get it right. uploading to production server for a new site, and part of the head.inc that starts everything up looks like this: echo...
1
by: M D | last post by:
Is there any framework or plugin for smarty which can be used with Ajax? M
2
by: Man-wai Chang | last post by:
I meant something like: {section name=j start=0 loop=10 step=1} {php} $xx={$smarty.section.j.index}; echo $xx; {/php} {/section} -- iTech Consulting Services Limited Expert of ePOS...
1
by: teddysnips | last post by:
NEWBIE ALERT!!! Using CMSMadeSimple When I try to browse my index.php page I get the following errors (this is just a sample - there are another 7 in the same format. string(102) "Smarty...
6
by: K. | last post by:
Hello! I have a problem with using php on smarty web page I would like to use a php code from this web page: http://www.money.pl/webmaster/# i.e.. <?php readfile...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.