3rd level catgory menu

7 posts by 3 authors in: Forums > CMS Builder
Last Post: March 14, 2017   (RSS)

By Toledoh - September 14, 2016

Hi Guys,

I'm using the code from http://www.interactivetools.com/forum/forum-posts.php?postNum=2237572#post2237572 to create a standard bootstrap menu.  However, this only works with parent and child (2 level) navigation.  How could I enhance it to wrap a third level?

I can use

<?php if ($categoryRecord['_hasChild'] && $categoryRecord['depth'] == '1'):?><div class="thirdLevel"><?php endif; ?>

but how can I find the last 3rd level record of that specific 2nd level record so I can close the div?

Cheers,

Tim (toledoh.com.au)

By Toledoh - September 16, 2016

Thanks Dave,

I'm trying to implement http://geedmo.github.io/yamm3/ which extends the basic bootstrap menu to a "mega menu" format. It's not as simple as I thought to generate.

I'll work it a bit further then yell if (when) I need help.

Cheers,

Tim (toledoh.com.au)

By kitsguru - March 10, 2017

I am working on this same issue as I too use yamm3.

What would be useful would be to know how many children and siblings there are. Also is it possible to limit the number of levels that a user can enter. I don't want them to go more than 3 deep.

Jeff Shields

By Toledoh - March 10, 2017

I never progressed this Jeff, just seemed too hard at the time. Let me

know if you get it working!

Cheers,

Tim (toledoh.com.au)

By Dave - March 14, 2017

Hi Jeff, 

> is it possible to limit the number of levels that a user can enter.

Yes, you can limit that under: CMS Setup > Section Editors > Your Category Section > Advanced > Max Depth

And if you're trying to create a specific type of menu I recommend mocking it up in HTML first.  If you can get it working right in plain HTML, but not in the viewer code, post the HTML, a backup of the section, and the section schema file, and we can take a look locally and help you with the code.  

Dave Edis - Senior Developer
interactivetools.com

By kitsguru - March 14, 2017

Thanks Dave

Can't believe I missed that.

Jeff Shields