Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

dynamic URLS


Reply


2 Posts   752 Views

Avatar
danzzz

Community Member, 175 Posts

7 March 2011 at 5:10am

hi

just working on a site where I have a product directory. I also have users. The can login and create own "lists" with products they love. From the datamodel site it's all done ... Members <-> Products (many_many).

Now I want that the users can see their products (they love) under this URL:

http://www.example.com/USERNAME/mylist1
or
http://www.example.com/USERNAME/mylist2

How to setup an eviroment which can handle this URLs?

thx

Avatar
danzzz

Community Member, 175 Posts

7 March 2011 at 7:49am

this helped me:
http://www.ssbits.com/tutorials/2011/using-a-nested-controller-for-generic-url-handling/

I test if the URLSegment is one of the usernames and if so I use a own controller, like here:
http://www.ssbits.com/tutorials/2011/controllers-instead-of-pages/