Thanks for following my tutorial. I use this code to redirect to the
referring page once logged in. Place it in your app controller.
// Referer
$referer = $refererLogin = $refererLogout = $this->referer();
if (empty($referer) || $referer == '/users/login' || $referer == '/')
{
$refererLogin = array('controller' => 'dashboard', 'action' =>
'index');
$refererLogout = array('controller' => 'homepage', 'action' =>
'index');
}
$this->Auth->loginRedirect = $refererLogin;
$this->Auth->logoutRedirect = $refererLogout;
As for the paging by first letter, you could try these:
$this->paginate['Model']['conditions']['Model.title LIKE'] = '%a';
OR
$this->paginate['Model']['conditions']['SUBSTR(Model.title, 0, 1)'] =
'a';
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---