[Dancer-users] Accessing template variables inside Wrapper (layout)

Olaf Alders olaf at wundersolutions.com
Thu Dec 30 22:50:08 CET 2010


On 2010-12-30, at 12:14 PM, Deepak Gulati wrote:

> Hi Folks,
> 
> Template toolkit allows me to set variables inside a template and then
> access them from the wrapper:
> http://www.template-toolkit.org/docs/manual/Config.html#section_WRAPPER
> 
> This doesn't seem to when using Template Toolkit with Dancer. e.g. in
> the index.tt that dancer generates, I added:
> <% foo = "bar" %> on the first line
> 
> and tried to access it from main.tt
> <title><% foo %></title>
> 
> But it comes out as blank.
> 
> Is dancer doing something special with the wrapper or am I doing
> something wrong?


Hi Deepak,

There is currently an open ticket for this:

https://github.com/sukria/Dancer/issues#issue/83

Best,

Olaf
--
Olaf Alders
olaf at wundersolutions.com

http://www.wundersolutions.com
http://twitter.com/wundercounter

866 503 2204 (Toll free - North America)
416 944 8306 (direct)



More information about the Dancer-users mailing list