[Dancer-users] defining a variable in a template that the layout can read
Brian E. Lozier
brian at massassi.com
Thu Mar 10 17:07:11 CET 2011
Perfect, thanks!
On Thu, Mar 10, 2011 at 7:50 AM, Olaf Alders <olaf at wundersolutions.com> wrote:
>
> On 2011-03-10, at 10:39 AM, Brian E. Lozier wrote:
>
>> I realized that the only user-visible strings that are in my dancer
>> perl code are the titles for pages. It's because I do stuff like
>> this:
>>
>> template 'foo.tt', { title => 'My Title' };
>>
>> Is there a way to define title in foo.tt such that the layout template
>> can see it?
>
> This should get you on the right track:
>
> http://search.cpan.org/~sukria/Dancer-1.3014/lib/Dancer/Cookbook.pod#TT%27s_WRAPPER_directive_in_Dancer_%28META_variables,_SETs%29
>
> 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