Welcome Guest, Not a member yet? Register   Sign In
Admin Functionality
#1

Hi all! I had a bit of a structure / organization question, wondering if there's a best practice or common convention to handle this. Assume a website with three Controllers: User, Catalogue, and Pages. Each of these controllers is using a Model to pull data from the database and display it on the page, validate user logins, etc.

Now suppose I want to create Administrators on this website, and give them the ability to add, edit, or remove users, catalogue entries, and pages. I can see two possible ways of proceeding:

1. Create a separate Admin Controller that has functions for adding, editing, and removing all three of these disparate content types.
2. Add Admin functions to each of the three separate controllers.

I was curious how others have handled this kind of functionality, what the best practice is (if there is one), and so on.

Thanks in advance!
Reply
#2

I as well as many others have "starters" that do much of what you are looking for.
While I don't have links to those at hand (just do a search for starter or backend or something along those lines) but, here is a link to mine http://projectorangebox.github.io/site/ I hope it helps.
Reply
#3

ha ha thats funny i just ranted on stack about this and i think you were probably the poster
unless there are a flock of CI peregrines Cool
Reply
#4

https://github.com/chaegumi/cxpcms
Reply
#5

(01-28-2016, 05:58 PM)cartalot Wrote: ha ha thats funny i just ranted on stack about this and i think you were probably the poster
unless there are a flock of CI peregrines Cool

Yes you did, and your answer was great! Validating that it's an Admin inside the Admin __construct was exactly what I was doing, so I'm glad to know I was going about it the right way!

dmyers: thanks for the link to that starter, but at this point I'm interested in developing this myself. But I think I'll bookmark that for later, seems like it could be a big time saver!
Reply
#6

(This post was last modified: 01-29-2016, 04:10 PM by cartalot.)

hey someone on stack deleted my comment - "don't let the trolls get you down". i really like stack but there are some people on there who do not like codeigniter. they will especially downvote new users questions. also there is or was someone on there with alot of 'points' who would downvote if you mentioned MVC and Codeigniter in the same post.

but despite all that - i really encourage people to post and answer questions on stack because its an opportunity to really help people make those first few steps. i can sure remember times being completely stuck and lost and posting to a board and just praying *someone* would answer my question. also i think its valid when people are asking really basic questions - to encourage them to do the tutorial in the ci manual.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB