Site migration - issue with Menu [SOLVED]

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Site migration - issue with Menu [SOLVED]

Post by wmdvanzyl »

Hi All.

I was asked to port this site to CMSMS:
Original: http://modh.co.za/peggystatic
CMSMS: http://peggy.modh.co.za

Please don't talk about the design decisions - clients are adamant and it's getting worse... anyyyyway.

What i need help on is this:

If you look at the original, you can see that clicking on a menu item sets the CSS class to "active" changing the background colour.

In the ported version this behavior doesn't work.

I have reached the point where i think i can attribute the behavior to the Twitter Bootstrap framework that they started with (bootstrap.min.js), but i don't know how to debug or investigate the issue further.

Any advice on a good way to find out what is going wrong will be appreciated.
Last edited by wmdvanzyl on Tue Mar 17, 2015 9:46 am, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Site migration - issue with Menu

Post by staartmees »

I see your Home-link is always marked as class="active"

Which menu.tpl are you using?
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Site migration - issue with Menu

Post by wmdvanzyl »

I just used their static menu structure and made a new menu template. Home starts out as being active and then the idea is that using javascript the class needs to be removed from that element and addded to the one that was selected, but my javascript-foo is baaaad. :(

Should i post the menu code?
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Site migration - issue with Menu

Post by staartmees »

it's better to use one of the menu templates that comes with your cmsms.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Site migration - issue with Menu

Post by velden »

wmdvanzyl wrote:I just used their static menu structure and made a new menu template. Home starts out as being active and then the idea is that using javascript the class needs to be removed from that element and addded to the one that was selected, but my javascript-foo is baaaad. :(

Should i post the menu code?
I think it's a misconception that javascript should be used to do that. It's not true.

It's the task of the menu template to set the proper class for the current/active. Have a look at the sample menu templates how to accomplish that.

Looking at your static pages: those have the class set in the source too.
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Site migration - issue with Menu

Post by wmdvanzyl »

Thanks velden and smartmees for the reply. I never realised this! I definitely need to spend time getting to know and understand the menu manager better.

I will check it out - thanks!

EDIT: Took your advice and started with one of the included menu templates. Then added the classes on that the new menu uses. A few adjustments and voila! Works.
Post Reply

Return to “The Lounge”