[Dancer-users] Dancer Noob => interpolating variables
ambs
ambs+dancer at perl-hackers.net
Tue Dec 14 21:40:09 CET 2010
On 14/12/2010 20:37, Puneet Kishor wrote:
>
>
> ambs wrote:
>> Hello.
>>
>> I am starting with dancer. Installed, run dancer -a, and changed a
>> template to include some variables:
>>
>> ..
>> <div><% sidebar %></div>
>> ..
>>
>> And in the rule, I have
>>
>> get '/' => sub {
>> template 'index' => {
>> 'sidebar' => 'bar',
>> };
>> };
>>
> Try
>
> template 'index', { sidebar => 'bar' };
No, nothing (btw, the '=>' is just a comma, in Perl);
More information about the Dancer-users
mailing list