Saturday, October 30, 2010

Re: current page info

you can create links in elements and do some checking to identify the
current controller and action. it's $this->params variable

On Oct 31, 6:49 am, grandioso <something.like.a.phenome...@gmail.com>
wrote:
> I feel really stupid for asking this, but I'm just noob baker, so...
> How do I add a "selected" class to a menu item that points to the
> current page and how do I create a title for the current page ?
>
> I created a default layout, and all the pages. Then I created the
> routes in 'app/config/routes.php' like "Router::connect('/contact',
> array('controller' => 'pages', 'action' => 'display', 'contact'));".
> It works just fine, but I have no idea how to add "selected" to the
> currently selected menu item and how to create a custom title for the
> page.
>
> It would be great if I could just pass the "title" and "selected"
> string in this array.
> Is it possible t

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: