[Catalyst] Dumb (?) question on TTsite

Alessio Bragadini alessio at sevenseas.org
Mon Feb 18 22:02:09 GMT 2008


On 18 Feb 2008, at 21:37, Alex Povolotsky wrote:

>>> How can I access variables in
>>>
>>> [% META %]
>>>
>>> part of template?
>>>
>>
>> META is compile-time.
>>
>> There aren't any variables yet.
>>
>>
> So do I have a way to modify title without rewriting TTsite  
> wrapper?...


I have this in my brand new code.

In root/lib/site/html:

   <title>[% site.name %]: [% page_title or template.title %]</title>

In a template with "static title":

[% META title = 'My Search' -%]

In a Controller:

$c->stash->{page_title} = qq{Search records matching "$q"};

-- 
Alessio Bragadini			alessio at sevenseas.org

"One of these mornings / You're going to rise up singing
Then you'll spread your wings / And you'll take to the sky"
	-- George & Ira Gershwin, "Summertime"






More information about the Catalyst mailing list