On Mon, Nov 10, 2008 at 3:47 PM, teknoid <[EMAIL PROTECTED]> wrote:
>
> Write the ID to session.
>
I guess you missed my last sentence:
> For the record, I do plan to keep this var in the session, once I can
figure out how to set it properly.
But my question was, what's the best way to get the ID in the first place?
Is there a more elegant way to do it than what I posted?
Also, I figured out why it wasn't working when using the '/' route. It was a
n00b mistake:
function beforeFilter()
{
if (isset($this->Issue))
{
$latest_issue_id = $this->Issue->getLatestId();
$this->set('latest_issue_id', $latest_issue_id);
}
}
should be:
function beforeFilter()
{
if (isset($this->Issue))
{
$this->latest_issue_id = $this->Issue->getLatestId();
$this->set('latest_issue_id', $this->latest_issue_id);
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---