If you enable admin routing you don't need to worry about any of that.
When turned on the admin routing allows you to add actions to your
controllers that have the "admin_" prefix. ( I am not sure if the required
prefix for the function names changes if you use a different admin name than
"admin" in the core.config file.

So in a controller 

function index( )
{
   ...
}

function admin_index( )
{
   ...
   // set your layout
   var $layout = 'admin';
}


the first would render the default layout and the
/controller_name/index.thtml view file
the second would render the /views/layouts/admin.thtml layout and the
/controller_name/admin_index.thtml view file

I hope this helps clear the issue up somewhat.


Dan-142 wrote:
> 
> 
> Hi Kevin,
> 
> Just to answer you before delving into clemos answer -which looks like
> the right way ;)
> 
> "I'm not quite sure what you're doing exactly. "
> 
> That makes two of us ;)
> 
> " You have a view called 'www' "
> 
> Yep! Named just because is the public web folder for the site...at the
> moment the www view is dealt with via a www controller which uses a
> www model too as all the public website data is held in the database,
> and then the controller switches on the path (index/about/contact,
> etc). Feel free to gmail me if you want to swap notes ;)
> 
> It's working really nicely, but I want the URL to be "real" rather
> than tie myself up in routing knots (which I have been a little due to
> naivety/lack of experience with CAKE)
> 
> Off Topic but I have to say that coming from a web background that
> started over a decade ago in C,Java,J2EE&Struts and then PHP, this
> whole framework is just awesome. If you've got the discipline to craft
> your design using some simple design patterns, it's a real priveldge
> to use it!
> 
> D.
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Suggested-dir-structure-for-public-site-with-admin-control-underneath--tf3154691.html#a8787882
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to