tags:

views:

26

answers:

2

Is there a way to get page title in a layout? I would expect sfResponse::getTitle() to work, but it doesn't.

A: 

I 'spose that $sf_response->getTitle(); ought to work... were you calling sfResponse::getTitle() statically?

Graham Christensen
You're right! $sf_response->getTitle(); worked. I'm dumb, I wasn't aware $sf_response was made available in layouts.
thisisrobv
A: 

Any reason you're not using the include_title() helper?

Peter Bailey
I don't want to include the title tag, just the title. Reason: <h1> tag at the top of the page layout, wanted it to be populated with the page title automatically.
thisisrobv
Ok, that makes sense.
Peter Bailey