I am wanting our sub navigation to always show the children of the current page, rather than showing the parent and all pages on the parent level, and the subs underneath the parent. When on a page I want our nav to show the children of that current page, but no higher than that level. The problem comes when there are pages with no children, so no sub nav gets printed.
That is my code that I am using, which works great because it always shows the children of the current page. But fails when there are no children. I have tried adding in some MySource_SUB tags in there so that I can set the classes for each level, but it seems to ignore these when I set my initial sub menu to "children".
How can I create my menu design so the menu is always changing to show its children, rather than just expanding to show the children underneath?
You have no <MySource_SUB> block, so the "show_subs" setting is ignored. This menu should print all the children of the current asset, if they exist. Is this not what's happening? Or is this not what you want?
Yes, I would like to print all of the children of the current asset, but ONLY on certain levels. I tried using mysource_sub tags, but I could not get it configured correctly to only show the children of the current asset. Here is an example of what I had before:
But this still seems to not work how I would like. In each nav, I would just like the children of the current page. And then the option to customize that within a customization.
That works. But when I get down to a level that does not have children my nav disappears. In that situation I want it to keep its current navigation and show its sibling assets.
It does not even seem to be using my mysource_subs tags. Shouldn't it be for lower levels? Or, since I specified "children" for the level, will it never use the subs tag?
But usually at those lower levels you would still like to see the siblings of the asset that you are currently on, even if it does have no children. So if I get to a lower level that has 3 pages, and I access one of those pages, my menu disappears, I want the user to see those siblings, not have the menu disappear and not be able to navigate to a sibling. Am I going about this the wrong way?
Have you tried using level="current" with a <mysource_sub> for the children? That would show siblings of the current page, with its children as well, with show_subs="on_current". Haven't actually tried this myself, though.
Can you even use <MySource_SET name="level" value="children"/> under a <mysource_sub> tag? It seems to have no effect. Also, I tried customizing each mysource_set tag and changing the level for each one, but it seems to have no effect. How can you use subs in part of the menu, and children in the other?
No, I meant changing the <mysource_area> to level="current" and then putting a <mysource_sub> into that. That will print the current level (i.e. page+siblings) with the children of the current page. Should be what you're after.
Yes, this works how I would like. But, it is showing the top level items in my subnav. It is redundant to have items in my top nav, and then again in my sub nav.
Screen Shot:
[attachment=230:Picture_4.png]
I have 2 different menu_normal design areas. One for the top level navigation which never changes. And another (with embedded mysource_sub tags) to list the sub navigation. It seems that should work together to not be redundant.
Is my problem here that I tried to use 2 menu_normal design areas, rather than 1?
Picture_4.png (33.3 KB)
First, the print="no" has no meaning in a <mysource_sub>, it'll always print based on the configuration of the <mysource_area> containing it.
Secondly, there is nothing wrong with the code: It's printing exactly what you're telling it to print. However, you have two menus that are printing the same level. Each menu design area is independent, so this is actually correct, i.e. the output is what I would expect.
hi… im having a similar issue… so im replying to this topic rather than creating a new one [should i create a new topic rather than replying to this existing one?]
anyway im trying to create a third tier navigation…
eg.
-TOP1 –
+SUB1
-SUB2 –
-CHILD1 –
-CHILD2
-CHILD3
-SUB3
+TOP2
-TOP3
i only want to see the sub and child items of the heirarchy section involved…
this seem fine when im at the sub level but when i click the child, the child level disappears [ i assume this is because it has no children and the 3rd tier level=children]
if i change the 3rd tier level=current it is fine if im at the child page but if i click the sub menu item the child tier disappears [i assume that is because the 3rd tier=current and doesnt then display the children] …
it seems like i want to dynamically change the 3rd tier level=value depending if im at the sub item or child item…
hmmm does this make sense?
am i going about creating a third tier menu the right way?
[quote]hi… im having a similar issue… so im replying to this topic rather than creating a new one [should i create a new topic rather than replying to this existing one?]
anyway im trying to create a third tier navigation…
eg.
-TOP1 –
+SUB1
-SUB2 –
-CHILD1 –
-CHILD2
-CHILD3
-SUB3
+TOP2
-TOP3
i only want to see the sub and child items for the section involved…
this seem fine when im at the sub level but when i click the child, the child level disappears [ i assume this is because it has no children and the 3rd tier level=children]
if i change the 3rd tier level=current it is fine if im at the child page but if i click the sub menu item the child tier disappears [i assume that is because the 3rd tier=current and doesnt then display the children] …
it seems like i want to dynamically change the 3rd tier level=value depending if im at the sub item or child item…
hmmm does this make sense?
am i going about creating a third tier menu the right way?
thanks
teak[/quote]
For our site we ended up using design customizations. We created a "subs" customization, that has the menu customized to start on level 3. Then just apply that design to the part of the site you need it.
Take all the "level" mysource_set lines out menu. Matrix defaults to "top", with each sub as the level below. I've also taken out the last "show_subs", because that level has no subs. :)