22400 Posts in 6746 Topics by 2749 members
|Go to End|
22 January 2010 at 12:02pm
for example if you had a long SUB-PAGE area
Instead of (DETAILS) being http://mysite.com/details/
How do I make the address
I tried ways but ended up messing the silverstripe software up and restart the installation!!!
22 January 2010 at 12:29pm Last edited: 22 January 2010 12:33pm
I understand it is not yet possible, but there are plans to introduce it in a later version.
In theory it should not be too difficult to implement; the URL handler just needs to match the longest path it can, and then pass the remaining path parts on to the module page that points at.
At the moment, just being one level, SilverStripe knows there will never be a clash of URLs. With extended paths there could be, but that's really for the administrator to deal with IMO.
For example, is /home/comments/interactive a page or module called "home" with "comments" and "interactive" passed in as parameters? Or is it a page called "/home/comments" with "interactive" as a parameter (e.g. a category of items to display in that page). I guess those are the kinds of things that need to be worked out.
I wrote a handler for another CMS that deals with this problem, and that just did longest-path matches. Where there was no ambiguity, it would also match any part of a path, e.g. "interactive" would be an alias of "/home/comments/interactive" so long as there was only one page called "interactive".
Another subsequence of this is that several different pages can have identical names, but the context of the path allows the CMS to decide which page is the target. e.g. two different pages could be called "news", but one is under "local" and the other is under "national", so the pages would be accessed as "/local/news" or "/national/news". It could also have been "/news/local" and "/news/national", but the potential problem does not go away because "local" and "national" could also be pages in other areas of the site.
22 January 2010 at 2:41pm
SFalepau - download the 2.4 alpha and have a play with that. That has nested urls included which is what you're looking for .
|Go to Top|