Thursday, September 30, 2010

Best way to handle sub-tabs

I have some tabs along the top of my CakePHP site and some sub-tabs
along the left side of my page. When I switch tabs, it goes to a URL
such as http://system/tabname. When I go to a sub-tab, I use $this-
>render to update the content of the view to what the user clicked
on. However, I'd like a URL such as http://system/tabname/subtab to
go directly to the subtab.

How might I accomplish this? Basically, I want to redirect to tabname/
index and then render the subtab.

My tabname index view sets up the side menu. The subtab just modifies
the inner content. The views/layouts/default.ctp has the top tabs
defined in them. Obviously, the side tabs change from tab to tab.

Hope that makes sense!

Thanks,
Joey

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: