Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » SilverStripe Main Navigation

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: 888 Views
  • barrycorrigan
    Avatar
    Community Member
    10 Posts

    SilverStripe Main Navigation Link to this post

    Hi Everyone,

    I'm new to SilverStripe I have went through the tutorials to create a basic site, and now im building one for a client now.

    I've started with the Main Navigation which looks like this

    <ul id="nav">
    <li><a href="company.php" id="company" >Company</a>
             <ul class="submenu">
          <li><a href="#">About us</a></li>
          <li><a href="#">How we raise funds</a></li>

       <li><a href="#">Why we recycle</a></li>
       <li><a href="#">FAQs</a></li>
       </ul>
          </li>
          <li><a href="recycling.php" id="recycling" >Recycling</a>
             <ul class="submenu">
          <li><a href="textile-recycling.php">Textile Recycling</a></li>

          <li><a href="#">Mobile Phone/Gadget Recycling</a></li>
          <li><a href="#">Host a clothing bank</a></li>
          <li><a href="#">Lost property recycling</a></li>
       </ul>
          </li>
          <li><a href="campaigns.php" id="campaigns" >Campaigns</a>
             <ul class="submenu">

          <li><a href="#">Despicable Me School Campaign</a></li>
          <li><a href="#">SOS Shoe Campaign</a></li>
       <li><a href="#">Schools</a></li>
       <li><a href="#">Bra Campaigns</a></li>
       </ul>
          </li>
          <li><a href="partners.php" id="partners" >Partners</a>

             <ul class="submenu">
          <li><a href="#">Dorest &amp; Somerset Air Ambulance</a></li>
          <li><a href="#">Essex Air Ambulance</a></li>
       <li><a href="#">Francis House</a></li>
       <li><a href="#">Hampshire &amp; Isle of Wight Air Ambulance</a></li>

       <li><a href="#">Keep it up Campaign</a></li>
       <li><a href="#">Naomi House</a></li>
       <li><a href="#">Thames Valley &amp; Chiltern Air Ambulance</a></li>
       <li><a href="#">Whizz-Kidz</a></li>
       <li><a href="#">Wigan Warriors Community Foundation</a></li>

       <li><a href="#">Yorkshire Air Ambulance</a></li>
       </ul>
          </li>
    <li class="news"><a href="news.php" id="news" >News</a></li>
       </ul>

    But in the CMS there are main pages that are not part of the navigation how do I get so it doesn't show these pages. For example the home page. This is proving quite confusing.

    This is what I have so far but it is listing all my pages

    <ul id="nav">
          <% control Menu(1) %>
                <li><a href="$Link" id="$MenuTitle" title="Go to the $Title.XML page">$MenuTitle</a>
                   <% if Children %>
                   <ul class="submenu">
                      <% control Children %>
                   <li><a href="$Link">$Title.XML</a></li>
             <% end_control %>
             </ul>
             <% end_if %>
                </li>
                <% end_control %>
             </ul>

    Regards

    Barry

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: SilverStripe Main Navigation Link to this post

    Hey Barry

    Try unchecking "Show in Menus" that can be found on the Behaviour tab of each SiteTree object.

    Barry

  • barrycorrigan
    Avatar
    Community Member
    10 Posts

    Re: SilverStripe Main Navigation Link to this post

    Hey swaiba,

    Thanks for that, Got it sorted.

    Thanks

    Barry

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