CakePHP: How do I change page title from helper?
- by Zeta Two
Hello!
I'm using a helper for static pages to add a part to the title on every page.
Currently I have the following code at the top of every static page:
<?php $this->set('title_for_layout', $title->output('Nyheter')); ?>
The purpose of $title-output is to append " :: MY WEB SITE NAME".
This works fine, but for simplicity I would rather just call:
$title->title('Nyheter');
At the top of every page to set the title. The problem is that I can't call $this-set() from within the helper. Is there a way to something like this or am I completely on the wrong path here?