i use cakephp and i want create login element .
this layout work as :
1- when i should login , that element should show this code:
echo $this->Form->create('User', array('action' => 'login'));
echo $this->Form->inputs(array(
'legend' => __('Login', true),
'username',
'password'
));
echo $this->Form->end('Login');
2- when i logged and element should show my information such as username or email.
if i use view i can use $this->Auth but i can’t use this way , there is another way for elements , thanks.
You could get information of loggedin user from session in elements, like:
Did you mean something like that