Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter CMS package for existing installation and URL routing suggestions
#1

[eluser]batfastad[/eluser]
Hi everyone

I made a custom CMS a while ago but I've decided now is the time to start using a framework to reduce the time I spend doing the boring stuff. I'm only just starting to look at frameworks - in the past I've always just done everything myself. I've already got a DB schema and templates for my CMS and I'm considering moving this over to CodeIgniter. Being new to CodeIgniter I'd like to know what's possible with regards to the URL layout and routing.

For ages I've been looking for a CMS that just does what I want. Wordpress, Drupal and Joomla are just far too heavyweight for my needs. Plus I don't think Wordpress is MVC based and you can always spot a Wordpress site from a mile away. I've tested Drupal and ended up installing about 20 modules just to get it anywhere near the way I wanted - even then the markup it generated made me want to cry. Joomla is pretty good but the actual editing of content (edit textarea far too small) and uploading of assets was just too clunky.

I had a look at PyroCMS which is based on CI and it's pretty close but still seems far too large for my needs. I guess what I'm looking for is a collection of controllers/views which can be dropped into an existing CI installation that will let me create/modify content stored in a database, then manually create different controllers and views to output this content. So if ever there's a project where I want to make it easy for people to update text/images without FTP access, then I can just drop this into the project.

1) I was planning on creating a controller (or collection of controllers), say /admin, which handles all of the CMS actions. The CMS will need to list content, edit/create content, delete content, create/edit users, delete users.
With CI's handling of URLs I undestand it's /controller/method/data
So would I be best creating a single controller /admin which then calls different methods to list content, edit content etc?
Or should I create each of those sections as its own controller?

2) With CodeIgniter I understand I can do custom routes, such as /blog and /news could actually use the same controller. But is it possible to prioritise these, so if a particular controller e.g. /testcontroller doesn't exist in my CI application, have it handled by controller x? Or have all unknown controllers handled by controller x?

3) How do views work if I want to output JSON, XML or partial HTML for a jQuery AJAX response?

4) Is there a way I can use CodeIgniter's controllers/views and my templates but from outside my application's directory?
In a particular case I might need a file to live in the web root of my system as it is called directly but it would still be brilliant to use CodeIgniter's functions and my application's config and theme/template.

5) Are there any CodeIgniter libraries/classes for user signin/signout and session control? I've got my own collection of functions and classes for password hashing/salting/peppering and signin/signout but if there's anything that's better integrated with CI then I'm willing to give it a go.

Does anyone have any comments or suggestions on my general idea?
I realise that most people will think that making this myself is probably overkill but I'm used to writing complete projects from scratch. This might well come in useful for other people as well.

Cheers, B




Theme © iAndrew 2016 - Forum software by © MyBB