Reputation: 28843
I have this function:
function view ( $id )
{
$this->layout = 'page';
$this->User->id = $id;
$this->set('title_for_layout', $username);
$this->set('users', $this->User->read());
}
What I want to do is show the username as the title but the current code I have doesn't do this... how do I do it?
Upvotes: 0
Views: 3395
Reputation: 2025
function view ( $id )
{
$this->layout = 'page';
$this->User->id = $id;
$this->set('title_for_layout', $this->User->field('username'));
$this->set('users', $this->User->read());
}
Upvotes: 0
Reputation: 2126
$this->User->id = $id;
$this->set('title_for_layout', $this->User->field('username'));
Upvotes: 3