Welcome Guest, Not a member yet? Register   Sign In
Building a CMS: Best Way To Handle Categories and Page Names In URL?
#1

[eluser]Vheissu[/eluser]
I am developing a CMS in Codeigniter one issue I am having is the URL structure. Because I have a pages module with a pages controller inside of it and using Modular Extensions I am routing every URL call except for the admin URL, etc and can't get the structure to turn out right.

Lets say I have categories and and a category can have a sub category and a page can belong to either a category, a sub category or doesn't belong to one at all, how would I handle that?

To put it simply, what is the best way to replicate the URL structure of Wordpress? So http://www.testsite.com/category/sub-category/page-name or http://www.testsite.com/category/page-name or http://www.testsite.com/page-name

I am storing the page slug separated as hyphens in the database, so I wonder if a function can be written that takes the URL and finds it in the database or something? Perhaps if you've developed something similar would you mind sharing how you did it please?


Messages In This Thread
Building a CMS: Best Way To Handle Categories and Page Names In URL? - by El Forum - 10-13-2010, 09:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB