Page 1 of 1

How to design the children in navigator

Posted: Sat Feb 17, 2018 12:44 pm
by petertak
Hi guys,
Is it possible to design the children of a navigator item? I already made a new Navigator design template and managed easily to style the main navigator items. But how about the childeren of an item? Is there a template for them?

I use CMSMS 2.2.5, navigator version = "1.0.8".

Thanx!

Re: How to design the children in navigator

Posted: Sun Feb 18, 2018 2:58 am
by DIGI3
You don't need separate templates for the children; Navigator templates are recursive. If you look at the default templates, you'll see that it cycles through the same sequence for parents and children.

Most of the sample templates add a class for the level, like .menudepth0, .menudepth1, etc., so you can target those in your stylesheet. You can add/calculate these yourself by using the $depth variable. For example, on my Foundation menu templates I usually have something like this in my Navigator templates:

Code: Select all

{if $depth==0}
  <ul class="menu accordion medium-dropdown">
{else}
  <ul class="menu">
{/if}
You can also just use css to target specific levels, like

Code: Select all

#mymenu ul ul
will just target levels below the first.

Re: How to design the children in navigator

Posted: Sun Feb 18, 2018 1:54 pm
by petertak
Thanx for your reply and explanation. Exactly what i needed, it helped a lot. Thanx again.

Peter