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.

General Questions /

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

Each Sub-Menu shows Sub-Menu Entries from all Pages


3 Posts   555 Views


Community Member, 1 Post

11 February 2013 at 8:04am

Edited: 11/02/2013 8:04am

I have a pretty simple site whose page hierarchy looks a bit like this:

- A
+-- A1
+-- A2
+-- A3
- B
+-- B1
+-- B2
+-- B3
- C
+-- C1
+-- C2
+-- C3

However, on the website itself, each top-level entry shows the second-level entries from all top-level entries, not just its own. So when I click on "B", I see all second-level entries from A1 to C3.

I really have no clue how this happened; I've never had this problem with Silverstripe. It doesn't seem to be theme-dependent; resetting to the original "simple" theme does not fix the problem. Flushing does not help. /dev/build does nothing. Is there something wrong with the database? I don't know, and I don't know what to do to test this idea, or fix the problem if it's true.

The Admin tools show the hierarchy just fine; it's only in the frontend where things are wrong.

I really have no idea where to even start to fix this problem. Any help?

Nobrainer Web

Community Member, 137 Posts

11 February 2013 at 11:03am


I'm abit unsure about how much you know about SS.
But to me it sounds like a template issue.

Somwhere in your code there is an include statement ( that inlcudes a navigation file. try to make a new navigation file, and put the following content into it - this should be an expanding menu - meaning only showing menu items under active menu.

<ul id="SubNavigation">
   <% control Menu(1) %>
   <li class="$LinkingMode lvl1 $FirstLast"><a href="$Link" title="$Title.XML" class="$LinkingMode levela">$MenuTitle.XML</a>
      <% if LinkOrSection = section %>
         <% if Children %>
            <ul class="SubLvl2">
               <% control Children %>
                  <li class="lvl2"><a href="$Link" title="$Title.XML" class="$LinkingMode levelb">$MenuTitle.XML</a></li>
               <% end_control %>
          <% end_if %>
      <% end_if %>
   <% end_control %>

Hope it helps, otherwise post more info and a version number please.


Community Member, 189 Posts

12 February 2013 at 6:06am

Is this a brand new 3.0 site? did you upgrade from 2.4 to 3.0? When did this problem occur? Does using a brand new database fix the problem?