Re: Limit to {section}

From: Date: Fri, 16 Nov 2001 09:34:47 +0000
Subject: Re: Limit to {section}
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1924@lists.php.net to get a copy of this message
According to me, you've gotta program it yourself. If you're interested, i've wrotten a script which uses smarty and displays a limited amount of pages numbers. In fact, it displays: - the 10 first pages - the 10 latest pages - 5 pages before and after the current one. SO, if you have 50 pages and are viewing page #20, it displays: << < 1 2 3 4 5 6 7 8 9 10 ... 15 16 17 18 19 20 21 22 23 24 25 ... 41 42 43 44 45 46 47 48 49 50 > >> Tell me if you're interested Bertrand LA> I would like to discuss an addition to the {section} function. LA> Would it be possible to have a limit to the number of loop we want to do ? LA> I use a template to navigate through a recordset, at the top of the page LA> there are page numbers displayed to go directly to the page you want. LA> The problem is that if you have 80 pages it doesn't look nice. LA> So my point would be to have something like LA> {section name=mysec loop=$myvar limit=10} LA> Would that be useful or am I completely out on this one ? LA> Arnaud.

« previous php.smarty.general (#1924) next »