21284 Posts in 5731 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 136 Views |
-
Each Sub-Menu shows Sub-Menu Entries from all Pages

11 February 2013 at 8:04am Last edited: 11 February 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
+-- C3However, 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?
-
Re: Each Sub-Menu shows Sub-Menu Entries from all Pages

11 February 2013 at 11:03am
Hi LKM,
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 (Page.ss) 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 %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>Hope it helps, otherwise post more info and a version number please.
-
Re: Each Sub-Menu shows Sub-Menu Entries from all Pages

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?
| 136 Views | ||
|
Page:
1
|
Go to Top |


