[Dancer-users] defining a variable in a template that the layout can read
Olaf Alders
olaf at wundersolutions.com
Thu Mar 10 16:50:20 CET 2011
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