[solved] Counter for entries in entries.tpl needed?
Posted: Fri Dec 14, 2007 2:39 pm
Hello!
I just thought about being able to have a text, a banner, etc. appear only 1 time (or 3
times, or 4 times as configured) on a page.
For example:
You'll have AdSense on your overview pages, where you show 10 entries. You want
to a horizontal AdSense Block under each entry's summary. But you must not
show more than 3 of those blocks on a page.
One can test a numerical variable in the Smarty template that counts the
number of entries on the current page. Then include or not include the text.
But how and where would I set up this variable?
Is there such a variable already?
Yours
John
I just thought about being able to have a text, a banner, etc. appear only 1 time (or 3
times, or 4 times as configured) on a page.
For example:
You'll have AdSense on your overview pages, where you show 10 entries. You want
to a horizontal AdSense Block under each entry's summary. But you must not
show more than 3 of those blocks on a page.
One can test a numerical variable in the Smarty template that counts the
number of entries on the current page. Then include or not include the text.
But how and where would I set up this variable?
Is there such a variable already?
Yours
John