Jump to:

23491 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How do you extend the URL

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1049 Views
  • musicfreak1995
    Community Member
    28 Posts

    How do you extend the URL Link to this post

    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!!!

  • Judge
    Community Member
    79 Posts

    Re: How do you extend the URL Link to this post

    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

  • Willr
    Forum Moderator
    5508 Posts

    Re: How do you extend the URL Link to this post

    SFalepau - download the 2.4 alpha and have a play with that. That has nested urls included which is what you're looking for .

  • musicfreak1995
    Community Member
    28 Posts

    Re: How do you extend the URL Link to this post

    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

    like so forth???

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.