Jump to:

23360 Posts in 18097 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Hirachical-Structure Design Problem with nested 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: 1518 Views
  • Bo_Einzeller
    Avatar
    Community Member
    18 Posts

    Hirachical-Structure Design Problem with nested URL Link to this post

    Hi all
    I have 2 separated navigations, one in the header and one in the footer. 'Til now, i had two Subfolders in the root, one for the pages in the header and one for the pages in the footer. Something like this:
    - Root
    +-TopNavigation
    ++-Home
    ++-Products
    +-BottomNavigation
    ++-Disclaimer
    ++-Contact

    So its easy to use control <% control ChildrenOf(topnavigation) %> and <% control ChildrenOf(bottomnavigation) %> in templates.

    With Hirachical URLs, the URL for Products is now TopNavigation/Products. But i don't want to have the Navigation-Pages listed in the nested URL (only "/Products").
    Has anyone an idea, how to hide an page in the hirarchical url or has a sugest to improve the structur.
    Thank for your help.

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: Hirachical-Structure Design Problem with nested URL Link to this post

    you could add a checkbox to page to note whether it is to be shown in the footer or not, and then check that when you're doing the menus

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Hirachical-Structure Design Problem with nested URL Link to this post

    You could put the pages into the Root and turn off "Show in Menus", then, under the TopNavigation and BottomNavigation trees create virtual pages (or redirectors) to the correct real pages.

    It's a bit messy - you might like to create a new tree called something nice ("info" maybe) that you can but them under just so it's 'namespaced' and you can keep them out of the way.

  • Bo_Einzeller
    Avatar
    Community Member
    18 Posts

    Re: Hirachical-Structure Design Problem with nested URL Link to this post

    Thanks for your Ideas. There are possible ways to solve my problem, but none of them is really easy to use for customers. The solution with different Subtrees-Folders in root was really intuitive and visual.
    @Hamish: I don't understand your suggestion with the "info"-tree. Should this tree be in root and which pages should it contain? Woulldn't there be the same problem with the hirarchical-Link (/info/)?

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Hirachical-Structure Design Problem with nested URL Link to this post

    yes.. but that was just to hide everything away so they don't clutter the root node - purely optional.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Hirachical-Structure Design Problem with nested URL Link to this post

    yes.. but that was just to hide everything away so they don't clutter the root node - purely optional.

    1518 Views
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.