[SOLVED] Multiple Navigator Menus On The Same Page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

[SOLVED] Multiple Navigator Menus On The Same Page

Post by govicinity »

CMS Made Simple™ 2.1.2 Andros Town
CGExtensions 1.52.2
AceEditor2 1.05
CGSimpleSmarty 2.0.5
CGSmartImage 1.21
CMSContentManager 1.1
JQueryTools 1.3.8
Navigator 1.0.2
SiteMapMadeSimple 1.2.8

OK, it's Friday, and it's safe to say I must be having a "moment".

I am trying to import two menus onto one page, simple yes... not for me today.

I am using the code below to pull the two menus in with different css classes attributed to them:

Code: Select all

{Navigator loadprops='0' template="main_menu" start_level='1' number_of_levels='1'}
{Navigator loadprops='0' template="secondary_menu" start_level='2' number_of_levels='1'}
The thing is it only seems to want to pull in the "main_menu" template whatever I do, the only difference between the templates so far is:

main_menu

Code: Select all

{function name=Nav_menu depth=1}
<nav class="main-navigation">
<ul>
and

secondary_menu

Code: Select all

{function name=Nav_menu depth=1}
<nav class="secondary-navigation">
<ul>
Help greatly appreciated, as I just can't see what I'm doing wrong today, trying to get my head around the CMSMS 2 version and it's changes, this seems to be my last sticking point.
Last edited by govicinity on Mon Mar 07, 2016 10:00 am, edited 1 time in total.
Going up, woop, woop.
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: Multiple Navigator Menus On The Same Page

Post by govicinity »

PS, just as a note, I have tried the template names as main_menu and mainmenu, secondary_menu and secondarymenu.
Going up, woop, woop.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Multiple Navigator Menus On The Same Page

Post by velden »

Try to change the function name in ONE of the templates.

IIRC it's not possible to reuse/redeclare a function name.
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: Multiple Navigator Menus On The Same Page

Post by govicinity »

Hi Velden, you're totally right, I actually did that, but the menu wasn't showing still, I have just realised I had display: none; on the secondary menu... as I said... I was having a bad Friday, couldn't see the wood for the trees. Thank goodness for the weekend and a small amount of sleep. Thanks again, hopefully this query post will help someone else out in the future anyway.
Going up, woop, woop.
Post Reply

Return to “Modules/Add-Ons”