From: Sam Tregar <[EMAIL PROTECTED]>
>So if I wanted to have <tmpl_var selected> set when $thing->{bar} was
on I'd add this to the loop body:
Thanks Sam. I understand now. It's essentially the same thing Puneet suggested last
night. At that point it was just a matter of whether it was better to have "<tmpl_var
selected>" resolved with each iteration of the loop or to test it as a boolean and, if
true emit " selected". It sounded like there wasn't much difference except it might
look less messy without the test (letting it resolve with each iteration).
>How would you setup @__selected__? Would it really be easier than the
>single line of code shown above?
Setting up my hypothetical reserved array name "@__selected__" would be the same as
the single line of code you used. Just an array of 0 (or undef) or 1 indicating if the
row should process my hypothetical lable "<TMPL_LOOP_CHECKED>".
I was just trying to think of some way to simplify the Template syntax. Some way to
move the testing for this commonly emitted string into H::T so the loop structure
might look cleaner. But, it sounds like the result of this idea wouldn't look much
different than just letting a TMPL_VAR resolve with each iteration. (Sorry).
>You're telling me you don't keep a list of your class attributes in
>your Perl code already? I don't believe you!
I don't understand. I don't have any elements or attributes in my Perl code. It's all
contained in templates. I feel like I'm missing a point of sarcasm?
Mark
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users