21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 831 Views |
-
How do you extend the URL

22 January 2010 at 12:02pm
for example if you had a long SUB-PAGE area
HOME
-COMMENTS
--INTERACTIVE
---DETAILSInstead of (DETAILS) being http://mysite.com/details/
How do I make the address
http://mysite.com/home/comments/interactive/detailsI tried ways but ended up messing the silverstripe software up and restart the installation!!!
-
Re: How do you extend the URL

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.
-- Jason
-
Re: How do you extend the URL

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
. -
Re: How do you extend the URL

27 January 2010 at 1:56pm
I tried modifing some codes of Silverstripe 2-2.0-alpha to Silverstripe 2-2.5 but never works!
Is there a module to configure making urls do
http://example.com/home/page2/page3/page4/....like so forth???
| 831 Views | ||
|
Page:
1
|
Go to Top |



