Hey Keith,

You can address this multiple ways. One way is mod_rewrite. Obviously this is outside of CodeIgniter. Another way is to define custom Routes (http://codeigniter.com/user_guide/general/routing.html). 

I personally recommend against one monolithic controller. I've found that if your controller is more than about a page of code, its failing DRY principles, difficult to refactor, difficult to test, etc. This is not always the case, but a decent generalization. Then again, if you can leverage models, libraries, and views, and still only have about a page of controller code, then go for it.

Eric

On Sun, Feb 19, 2012 at 9:58 PM, keith smith <klsmith2020@yahoo.com> wrote:

Hi,

I'm looking at CodeIgniter.  I would like to change the way it works a little bit. 

URL's will take on this pattern:

MyDomain.tld = is the index

MyDomain.tld/page-name (stand alone page)

MyDomain.tld/cat1/catn (one or more categories) (display the last category)

MyDomain.tld/cat1/catn/article-page  (one or more categories then an article page) (display article)

I would like to read the URL in a main controller.  There would only be one controller.  I would break the URL into its arguments and decide what Model and View to load and display.

Is it possible to configure CodeIgniter to function this way?

Thanks in advance!

------------------------
Keith Smith

---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss