Wordpress like url structures |
[eluser]stORM[/eluser]
Sorry to ask this I know its ask before in some way (clean urls and such) I'm reading the documentation up and down but I'm still confused. I wonder how would one create an url structure similar to wordpress. Let's say we have a site where we have he following links in the navigation: Home About Service Blog Contact My wish would be if you click on those links that you will have an url which looks like: http://your_name.tld/home http://your_name.tld/about http://your_name.tld/service http://your_name.tld/blog http://your_name.tld/contact Lets say you click on the blog link then you would receive the 10 last entries from the database. Now for each entry inside of the blog category we will have a button where we get the full article when you click on the button we would (I assume) have an url which looks like: http://your_name.tld/blog/category/your-category/ or http://your_name.tld/blog/category/date/ or http://your_name.tld/blog/categroy/id I tried over and over again, reading about routes, redirections and such but still not able to do that. I'll ended up with the following: Model blog_model.php Controller blog_controller.php View blog_view.php Inside of the View I had a function called blog. This ended up with this url structure when someone click on the navigation section blog http://your_name.tld/blog/blog/235 or another try I got http://your_name.tld/home/blog/235 Could someone perhaps clarify what to do to have kind of the structure I have mentionend at the beginning also is that possible to build this structure with only one view instead of multiple views for each navigation link? So lets say you have only one base view (functions are: home,about,service and so on) Maybe my problem is naming conventions or whatever so could you tell me perhaps: What names do the views should have what names the function must have and how I route that stuff correctly? regards |
Messages In This Thread |
Wordpress like url structures - by El Forum - 04-05-2012, 03:39 AM
Wordpress like url structures - by El Forum - 04-05-2012, 04:33 AM
Wordpress like url structures - by El Forum - 04-05-2012, 05:05 AM
Wordpress like url structures - by El Forum - 04-05-2012, 05:27 AM
Wordpress like url structures - by El Forum - 04-05-2012, 05:32 AM
Wordpress like url structures - by El Forum - 04-05-2012, 05:58 AM
Wordpress like url structures - by El Forum - 04-05-2012, 08:55 AM
|