plainblack.com
Username Password
search
Bookmark and Share

    

How is __counter__ used?

User sandraqu
Date 3/14/2007 1:07 pm
Views 3701
Rating 0    Rate [
|
]
Previous · Next
User Message
sandraqu

Will someone explain the syntax of using the __counter__variable in a template.

I am hoping to count and limit the number of loops a template executes.  

This is my guess.  It did not work.

<tmpl_var __counter__=0 >
<tmpl_if __counter__<5 >
<tmpl_loop rows_loop>

.

.

.

 

Thanks 

--- (Edited on 3/14/2007 1:07 pm [GMT-0500] by sandraqu) ---



Back to Top
Rate [
|
]
 
 
colink
The variable only exists inside of a loop, and HTML::Template will only allow you to print it out.  If you need to do anything more fancy than that, then print it out (inside of a loop) inside javascript, or install HTML::Template::Expr, which will let you do additional things.

--- (Edited on 3/14/2007 3:40 pm [GMT-0500] by colink) ---



Back to Top
Rate [
|
]
 
 
    



© 2019 Plain Black Corporation | All Rights Reserved