"I didn't realise you were considering having admin"

Sometimes I wont be but sometimes I will. For example, a customer
profile page allows them to edit everything, but maybe not username
like most other sites/forums people register on. But Admin on the
other hand when editing a customer detail will see the exact same page
as the customer, but have the ability to change username.

So in this case having the same view would be easiest with just a
check to see if the user is admin and if so make the username
editable. So in a situation like this no need to have a separate admin
app or use admin router. I want to avoind having 2 views for this in
case I add some fields one day, then I have to add them twice.

On the other hand admin will also see admin pages, like settings and
things that the customer wont see. So in this case a separate view is
fine.

So its trying to build the best admin area to consider all the above.

I read somewhere else about rendering a view file for this. $this-
>render(’view_file_name’);

Does this mean I can use the admin routing to create the admin area,
then for the views that require the same view file with a few admin
checks I can just call this? That sounds the best. So i can create
admin views for admin views, customer views for customer views and
"joint" views where the code is the same and just render these in the
appropriate customer/admin views. Not so familar with rendering it
(still a cake newbie) but this principle sounds good.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to