Welcome Guest, Not a member yet? Register   Sign In
Admin Logic
#2

[eluser]jedd[/eluser]
Hi sejje and welcome to the CI forums.

[quote author="sejje" date="1259127065"]
For instance, perhaps there is an image or blog post displayed with a title and caption. Admin-level users will have an option displayed to edit the title/caption, and perhaps delete the entire image/post. Regular users will have the image, title and caption displayed, but without an option to edit them.
[/quote]

This seems to be a fairly commonly perceived Best Practice way of doing things.

Quote:Hopefully I'm not a dunce, but I can't figure a way to retain this functionality without putting the logic directly into the view. I'd rather not, if there's a better option, so I appeal to the experts.

Obviously some logic will need to be in your view - as it was in your legacy system.

The distinction is whether it's business logic or display logic - as the latter is considered kosher for view use. The trick is to pass a variable to your view that denotes whether the admin functions are visible or not - the variable is determined and set by controller, of course.


Messages In This Thread
Admin Logic - by El Forum - 11-24-2009, 05:31 PM
Admin Logic - by El Forum - 11-24-2009, 06:19 PM
Admin Logic - by El Forum - 11-24-2009, 06:25 PM
Admin Logic - by El Forum - 11-24-2009, 06:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB