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.
Site migration - issue with Menu [SOLVED]
Site migration - issue with Menu [SOLVED]
Last edited by wmdvanzyl on Tue Mar 17, 2015 9:46 am, edited 1 time in total.
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Site migration - issue with Menu
I see your Home-link is always marked as class="active"
Which menu.tpl are you using?
Which menu.tpl are you using?
Re: Site migration - issue with Menu
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?

Should i post the menu code?
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Site migration - issue with Menu
it's better to use one of the menu templates that comes with your cmsms.
Re: Site migration - issue with Menu
I think it's a misconception that javascript should be used to do that. It's not true.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?
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.
Re: Site migration - issue with Menu
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.
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.