Jump to:

17488 Posts in 4473 Topics by 1978 members

Archive

SilverStripe Forums » Archive » Urls, why no 'sublevel' urls?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, simon_w

Page: 1 2 3 4 5 6 7
Go to End
Author Topic: 30748 Views
  • mobiusnz
    Avatar
    Community Member
    3 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    If nested urls do become part of the core (as I hope), has there been much thought as to what to do with functions? /page/function wouldn't work too well as sub-pages might step on needed functions (or vice-versa).

    Maybe there could be an option to specify how we want functions to be delimited? Some examples would be:

    site.co.nz/page/sub-page#function
    site.co.nz/page/sub-page?function
    site.co.nz/page/sub-page.function
    site.co.nz/page/sub-page~function

  • ajshort
    Avatar
    Community Member
    242 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    By default, if there is a conflict, the page takes priority over an action. However, if you define an $allowed_actions on your controller (a good idea), any action conflicts found in this will be automatically rewritten.

  • Hubertus
    Avatar
    Community Member
    14 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    I suggest to introduce a default "index" function to somewhat emulate the standard of delivering an index.html when a directory is called.

    A request to root/page/subpage/ would be handled by that default function and simply display the content of subpage (just as root/subpage would do right now), while root/page/subpage/add would execute the specific add function on subpage (root/subpage/add in SS 2.2).

    In other words: a slash at the end of the URL simply displays that page, while anything after the last slash is a specific function. This way, pages can be nested as deep as one wants and still have a function, both with pretty and meaningful URLs.

  • thisisred
    Avatar
    Community Member
    9 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    Now that 2.3rc1 is out. Has anyone attempted to work with the Sublevel Url issue with it? I have it installed on my test server but obviously the old hack isn't compatible...

  • Liam
    Avatar
    Community Member
    462 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    There is a nestedurl branch in subversion which you can use. I haven't used it, so not sure which core version it is based off of.

    That's about it really until it gets merged and made official.

  • simon_w
    Avatar
    Forum Moderator
    421 Posts

    Re: Urls, why no 'sublevel' urls? Link to this post

    ajshort's maintaining the nestedurls branch, and it is based of trunk.

    30748 Views
Page: 1 2 3 4 5 6 7
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.