[Templates] Order of evaluation

Simon Wilcox essuu@ourshack.com
21 Nov 2002 12:31:29 +0000


On Thu, 2002-11-21 at 12:15, Andrew Beattie wrote:

> Does that make sense?

kinda :)
 
> So the question was:  can I tell TT to evaluate all it's variables before it does
> anything, or do I need to explicitly reference them to get them to evaluate?

I'm wondering why you want to delay the population of the hash ?

I assume that you are passing 'columns' and 'body' to multiple template
but only actually using them in one template ?

If that is the case, do you use 'columns' elsewhere ?

If not, I would move the population code into a function called by
'columns', which populates the 'body' hash.

If you re-use 'columns', with all the columns in, I would probably
create a new variable called 'dynamiccolumns' or some such and do the
population there.

HTH,

Simon.