Ok so make my own dynamic page controller. So how about if I want the urls
to be:
Domain.com/home
Domain.com/about
Domain.com/projects
Etc ...
So would I create specific methods in my controller for each of those:
e.g.
function home()
{
}
function about()
{
}
function projects()
{
}
Thanks, Mark
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: Sunday, February 04, 2007 4:33 PM
To: Cake PHP
Subject: Re: For basic page_controller what is the typical setup
cake's pages controller is meant for static pages.
for dynamic pages, i would create a new controller, along with a
model. Although you could override the pagescontroller to extend it's
functionality offcourse.
And i think the using elements for menus is a good idea, i do it too.
Although you must be careful: if the element is called in the layout,
it will _always_ be shown when the default layout is used (hence:
probably for each section on your site)
so you must be sure the $menu variable is always set. The home action
is not the right place for that.
AppController's beforeRender function is a good place to do that.
You could even put the $this->requestAction('/menus/getMenus') right
in the menu element. It's very easy and many people do it like that
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---