3215 Posts in 848 Topics by 811 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 324 Views |
-
How to hide "Just those pages"..

8 December 2012 at 6:25am
Hi, i have a menu that looks like this, typical SS3 menu:
<ul>
<% loop Menu(1) %>
<% if Children %>
<li class="showSubMenu"><a href="#" title="$MenuTitle">$MenuTitle</a>
<div class="outerSubMenu" id="$URLSegment">
<ul>
<% loop Products %>
<li>
<div class="subMenu">
$IconeProduit.SetWidth(160)<br />
<a href="$Link" title="$Title">$Title</a>
</div>
</li>
<% end_loop %>
</ul>
</div>
</li>
<% else %>
<li><a href="$Link" title="$MenuTitle">$MenuTitle</a></li>
<% end_if %>
<% end_loop %>
</ul>It does what i want i.e.: shows div.submenus only if there are childs and
=> returns no links, only a clickable eventa href="#"
=> hides the submenus using CSS if neededid="$URLSegment"
and there is no child, then there is
<li><a href="$Link" title="$MenuTitle">$MenuTitle</a></li>
Fine. But what if i want SOME CHILDREN NOT SHOW????
Using <% if PageType = ... %> ? => problem is that they are all same pagetype
Using <% if URLSegment = ... %> ? => dont want to mess with that (user can add child as needed)
Using <% if ChildrenOf(..) = ... %> => does that exist? If so, how to implement?
Thanks!
-
Re: How to hide "Just those pages"..

8 December 2012 at 4:25pm
Can you not just untick the 'Show In Menus' option in the CMS? This will hide the page from <% loop Children %> and any other feeds.
-
Re: How to hide "Just those pages"..

8 December 2012 at 4:53pm
nope i cant. because if i do, this:
<% loop ChildrenOf(the-page-i-dont-want-children-to-show)%>
wont return anything...
-
Re: How to hide "Just those pages"..

20 December 2012 at 3:45am
Well you can always create your own 'soft' don't show in menus custom field in your page model and then check it with an if block in the loop in your template .
| 324 Views | ||
|
Page:
1
|
Go to Top |


