how to get the last n planet entries

Pau Arumi parumi at
Fri Mar 9 20:10:57 EST 2007

En/na Pau Arumi ha escrit:
> En/na Jeff Waugh ha escrit:
>> <quote who="Pau Arumi">
>>> 'm using planet stable 2.0.
>>> i want to fill a box of in my project page with the last n planet
>>> entries. i guess i the template language allows me to do that.
>>> but i don't see an obvious way. do you have any tips on how to do
>>> it?
>> I just make a new template, which outputs a separate file, and use 
>> include
>> functionality (SSI, CMS includes, whatever) to put it into the final 
>> page.
>> Here's an example of a template for a common use case (a bullet list 
>> of the
>> latest headlines):
>> <ul>
>> <TMPL_LOOP Items>
>> [...]
>> </ul>
> yes, but how can i break the loop after, say, the first 5 iterations?

i think i got it. was looking at the wrong place. this kind of things
should be defined in the .ini file, not in the template, right?

i guess it's a matter of just overriding the settings for a particular
template file like this:
items_per_page = 5


More information about the devel mailing list