21307 Posts in 5737 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » declare menu2 to only pull sub pages from a certain page. - HELP!
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 528 Views |
-
declare menu2 to only pull sub pages from a certain page. - HELP!

13 February 2011 at 2:13am Last edited: 13 February 2011 2:15am
Hi All,
I have pages with sub pages.
In my home page footer I have page headings and I want to list the sub pages under the page headings.
How to I declare menu2 to only pull sub pages from a certain page.
I.E.
Page Heading_____Page Heading_____Page Heading_____Page Heading
Sub page_________Sub page________Sub page_________Sub page
Sub page_________Sub Page________Sub Page_________Sub Page
Sub page_________Sub Page________Sub Page_________Sub PageI want to do this seperatly so each page heading is a separate menu2 declaration if that make sense.
etc.
If anyone can help, that would be great!
Cheers
Danny
-
Re: declare menu2 to only pull sub pages from a certain page. - HELP!

13 February 2011 at 3:35pm
Well you can use <% control ChildrenOf(page-url) %> to get the children of a given page. Or if you are making the list of Page Headings from a <% control Menu(1) %> then you can use <% control Children %>.
-
Re: declare menu2 to only pull sub pages from a certain page. - HELP!

13 February 2011 at 9:57pm
Hi Willr,
<% control ChildrenOf(page-url) %> worked for me.
Thanks for your help.
Danny
| 528 Views | ||
|
Page:
1
|
Go to Top |


