Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Template Toolkit foreach loop

by sundialsvc4 (Abbot)
on Mar 07, 2013 at 14:34 UTC ( #1022245=note: print w/replies, xml ) Need Help??


in reply to Re: Template Toolkit foreach loop
in thread Template Toolkit foreach loop

I tend to try to put logic concerns in the application, and presentation concerns in the template.   Usually, one subroutine is called to build the page.   It assembles information in its local variables, sometimes also defines a “closure” (a code-ref) that the template will use to withdraw the information that it needs, then invokes the template.   The information it needs is prepared in advance.   The template drives how it looks, and if Marketing wants to completely re-design that, the program won’t break.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022245]
help
Chatterbox?
[Corion]: A good daystart to everybody!

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-08-24 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (365 votes). Check out past polls.

    Notices?