Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Dancer Arrayref to Template

by dasgar (Curate)
on Nov 01, 2013 at 21:12 UTC ( #1060843=note: print w/replies, xml ) Need Help??


in reply to Dancer Arrayref to Template

By default, Dancer uses a simple templating system that has syntax that is very similar to Template::Toolkit. However, you can only pass scalars and you don't have other control stuff (like if statements, loops, etc.). If you try to pass an array or hash to the template with the default templating system choice, the variable in the template will only have the array reference or hash reference.

In order to use Template::Toolkit, you need to have template: template_toolkit in your config.yml file or set template => 'template_toolkit'; in your code itself. Look at the Dancer::Config, Dancer::Template and Dancer::Template::Simple documentation for more details.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060843]
help
Chatterbox?
[LanX]: ha ha ... happy Czech :)
[choroba]: been to the War Remnants Museum, too. Quite a brutal experience
[choroba]: but still, small-talk about smuggling guns and how Trump is great with US expats isn't my cup of tea
[LanX]: brutal beer?
[LanX]: met a Canadian yesterday, he suggested building a wall and let the US pay for it
[choroba]: No, but lots of pictures of the Agent Orange victims, plus some deformed foeti
[LanX]: ugh

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-02-26 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (371 votes). Check out past polls.