Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Show sub menu from another page on homepage

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

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

Page: 1
Go to End
Author Topic: 1817 Views
  • bod
    Avatar
    Community Member
    72 Posts

    Show sub menu from another page on homepage Link to this post

    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 ?

  • bod
    Avatar
    Community Member
    72 Posts

    Re: Show sub menu from another page on homepage Link to this post

    anyone?

  • bod
    Avatar
    Community Member
    72 Posts

    Re: Show sub menu from another page on homepage Link to this post

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

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

    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.

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