I hope this isn’t a completely stupid question, but I just couldn’t find the answer to this anywhere!
Is there some function that comes with CakePHP that allows you to detect what page the user is on? (eg – Detect what action they are on).
I want to do this so I can display an active class on my navigation bar if they are on the correct page.
Please let me know if there’s a better way to this than detecting the page/action they are on!!
Thanks,
Adam.
Sure. Check out the
$this->paramsarray inside your view to see what you have available 🙂