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.

Archive /

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

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

Show sub menu from another page on homepage


Reply


3 Posts   1878 Views

Avatar
bod

Community Member, 72 Posts

1 August 2008 at 7:55am

Edited: 01/08/2008 7:56am

Hi, - wonder if someone can help me please - I need to place a series of level 2 links from another site section on the homepage, following the logic in the tutorials I constructed this bit of code and placed it in my HomePage.ss file

<% control Page(about-us) %>
   <% if Menu(2) %>
<ul id="Menu2">
    <% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the $Title page">$MenuTitle</a></li>
    <% end_control %>
</ul>
   <% end_if %>
<% end_control %>

doesn't seem to be working though :o/ any ideas ?

Avatar
bod

Community Member, 72 Posts

3 August 2008 at 1:24am

anyone?

Avatar
bod

Community Member, 72 Posts

3 August 2008 at 5:03am

Edited: 03/08/2008 5:08am

Managed to find the right approach just now using Google which came up with this page

[url]http://doc.silverstripe.com/doku.php?id=built-in-page-controls[/url]

which led me to alter the above attempt to...

<% if ChildrenOf(about-us) %>
   <ul id="Menu2">
                  <% control ChildrenOf(about-us) %>
                     <li class="$LinkingMode"><a href="$Link" title="Go to the $Title page">$MenuTitle</a></li>               
                  <% end_control %>
   </ul>
            <% end_if %>

which appears to work, just in case anyone else is stuck for this kind of control. Kinda odd none of the SS team could help on this one?

Obviously with a free open source CMS I don't expect to be spoon fed, people are busy - we all are - but a bit of a guiding hand in the shape of better documentation/tutorials that cover a bit more than the five that come with the set up would really help this project as it's a lovely CMS from a end user POV and I think very flexible given the experience and more verbose easy on the brain step through docs being made available.

Feel that I am on a very steep learning curve at the moment and not much in the way of a safety net.