Reputation: 2385
Basically all I want to do is, instead of creating 2 unique views for the admin and user interface, I only want to display the CRUD controls next to the items when the admin IS logged in.
Now the way I am currently doing it is checking the Auth session status and echoing out the controller links IF the Auth session has be activated..
But I wanted to know if there are any other (maybe better) approaches anyone might like to suggest.
Upvotes: 0
Views: 227
Reputation: 6571
I understood your question perfectly.
There are, as you realise, several approaches to this all with their pros and cons.
If you want to show the disabled controls, then you'll need to do something like what you already have.
I think I'd be more inclined to separate the views. This approach will allow you to style the view profile and edit profile views individually, perhaps better reflecting public and admin styles. You'll still need to check the Auth, of course.
Upvotes: 1