Jump to content

Combining SE friendly URL structure with content management


fubowl

Recommended Posts

I would just like to throw this out there to see if anybody can help my search. I have yet to field either a CMS or a tutorial that can show me how to combine these two.

I've seen some CMS's that support the friendly URL's but I would like the entire structure to be defined within.

A complete "virtual site structure". No pages, except the neccessary code of course, everything else contained within the db. So I could just add [a href=\"http://mysite.com/hello/world\" target=\"_blank\"]http://mysite.com/hello/world[/a] and then be able to create pages within that directory.

I'm also trying to find a way of managing this structure as easily and efficient as possible since I know that each time a page would be accessed the recursion would yield a lot of queries.

Thanks in advance.
Link to comment
Share on other sites

Don't know if this is what you mean but it could be this.

You would need a table, say called pages, with an id, title, text for example. If you would need to group pages into categories add a category_id field and a categories table to match.

You could use tinymce for the editor to help the cms users edit the text in each page.

Then to access an individual page you could do it like this www.domain.com/1/1/ which mapped to index.php?category=1&page=1 (by Apache's mod_rewrite) would then give you the page (just fetch the row from the database).

Of course, if you would like to use the category name and page title, just use those instead of the id numbers. So, this
www.domain.com/categoryname/pagetitle/
would map to this
index.php?category=categoryname&page=pagetitle

You would then have to make sure that there isn't more than 1 page with the same title in each category.

Just my quick thoughts. Hope it helps.

Best,

Sofia
Link to comment
Share on other sites

Thank you for your help, but I was being very unclear which I apologize for.

Here is a more refined question directed towards this mean.

How would I go about matching a string, such as [a href=\"http://mysite.com/category1/subcat2/subsubcat3/my-article-on-something.html\" target=\"_blank\"]http://mysite.com/category1/subcat2/subsub...-something.html[/a] with it's proper entry in a Db based hierarchy. I guess that is what I'm really trying to get at. I have no idea how I could go about looping through parent/child relationships or once i break the url into an array, how i could go about getting a specific entry via this manner.

If you have any experience with this, I would greatly appreciate the help. I'm pretty new with all this and am still trying to get oriented, so any help on the way to setup the table and the neccessary code would be helpful.

Thanks.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.