Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Hirachical-Structure Design Problem with nested URL


Go to End


6 Posts   2234 Views

Avatar
Bo_Einzeller

Community Member, 18 Posts

8 May 2010 at 8:45pm

Edited: 10/05/2010 6:26pm

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.

Avatar
AdamJ

Community Member, 145 Posts

9 May 2010 at 1:06am

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

Avatar
Hamish

Community Member, 712 Posts

10 May 2010 at 3:37pm

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.

Avatar
Bo_Einzeller

Community Member, 18 Posts

10 May 2010 at 6:41pm

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/)?

Avatar
Hamish

Community Member, 712 Posts

10 May 2010 at 10:52pm

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

Avatar
Hamish

Community Member, 712 Posts

10 May 2010 at 10:52pm

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