Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

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

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

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

Page: 1 2 3 4 5 6 7
Go to End
Author Topic: 31649 Views
  • Decisive Flow
    Avatar
    Community Member
    73 Posts

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

    If i have a page support -> help -> dashboard-help
    I expect the url to look like: http://www.planhq.com/support/help/dashboard
    but instead it looks like: http://www.planhq.com/dashboard

    any chance we have the choice?

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

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

    Sounds like a reasonable request to me
    It might not make 2.1 but we'll put it on the to-do list...

  • Sam
    Avatar
    Administrator
    679 Posts

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

    This is actually trickier than you might think.

    The problem is that if you visit support/help, you might mean the help action on the support page. Compare it to blog/rss, for instance, which is a different view of the blog page, rather than a sub-page in the CMS.

    Your best bet is to make the page URL support-help-dashboard. It's possible that we could make the default URLs generated using this format.

  • tito0224
    Avatar
    Community Member
    8 Posts

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

    how would you go about setting the default of urls like that?

  • laktek
    Avatar
    Google Summer of Code Hacker
    76 Posts

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

    Can't we implement a similar concept as Routing components in Rails ?

  • 10Speed
    Avatar
    1 Post

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

    I see what Sam is saying, but it would seem to me that presenting the same page differently would be the less frequent need? and same page with different information vs different page, its almost splitting hairs conceptually.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

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

    It sounds like more work than it's worth to be honest. How would you have a generic solution for any page you create in the CMS? What happens if you have mysite.com/home/blog, the blog method will get called as well as the page with 'blog' as the URL segment?

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

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

    > It sounds like more work than it's worth to be honest. How would you have a generic solution for any page you create in the CMS? What happens if you have mysite.com/home/blog, the blog method will get called as well as the page with 'blog' as the URL segment?

    Indeed, I used to really want 'sublevel' urls, but I've been thinking that not having them has the following advantages:
    * URLs are shorter which makes it much easier if someone ever needs to type them in
    * If I rearrange my website, my URLs will remain stable.

    31649 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.