Okay, so I haven't finished the "append" method yet. But, I wasn't slacking!
I was using the {foreach} tag to test my fledgling "append" method code, and discovered some weaknesses with {foreach}. So, I re-wrote the compiled output code for the {foreach} tag. It was tougher than I thought. I had to start at square one: smarty.net {foreach} examples, and about 70 lines of pseudo-code in ASP, just so I could get the big picture. However, the end result was worth it. {foreach} compiles to much nicer, and probably stronger, code.
I also discovered (and more importantly, FIXED) a huge {include} issue. The chance for a variable collision in the compiled code (i.e., two identically-named variables) was guaranteed if there were two include statements that both use {foreach} or {section}. Now, compiled filenames have incrementing numbers, even different filenames.
Thursday, November 12, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment