[Solved] Minor modifications to Menu

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

[Solved] Minor modifications to Menu

Post by vayumahesh »

I am new to CMS Made Simple. I have to make minor modifications to the menu and could not figure out how. Here are the two things I need to do.

1. Highlight (change font color) the current active link in the menu.
2. Fix the bug/issue with "number_of_levels"

Here is the code I have inside the site template.
{cms_module module='menumanager' template='simple_home.tpl' number_of_levels='3' collapse='1'}
{* leftmenu *}

I located the "simple_home.tpl" in "Content->File Manager/modules/MenuManager/templates" and made the following change (after downloading to my computer).

{if $node->current == true}
{$node->menutext}

However, , when I tried to upload the file from the "upload files" tab, I am getting error message "failed to upload successfully". Not sure what I am doing wrong here.

About the second issue, "number_of_levels=3" is not working properly. "number_of_levels" is applying not only to the current link but all the parallel links too.

How do I resolve this issue ? Thanks a lot for any help.
Last edited by vayumahesh on Wed Dec 15, 2010 3:26 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Minor modifications to Menu

Post by Dr.CSS »

First, if you want to make a custom template go to Menu manager and click the Import to Database icon on the far right then you name it and submit, then you can make all the changes you want w/o having to FTP etc. to site...

Any other help will require a link to site...
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

I clicked on the "Import to Database icon" for "simple_home.tpl" and made the change. But still the change is not visible on the web page (I checked the "View Source"). What else should I do ?

Here is the change I made to the template (assigned CSS class to the current active link).

{if $node->current == true}
{$node->menutext}

The CSS code is added to the site css file as follows.

.currentActiveLink {
color:#330099;
}

Here is the link to the site.
http://triskeles.org

When you click on any link in the left-side navigation, the link should change color signifying it is the current active link.

The other issue I mentioned with "number_of_levels" can be noticed when you click on "Food for Thought" under "Triskeles Youth" in the left-side navigation. Notice that "Side by Side" also expands when "Food for Thought" is clicked.
Last edited by vayumahesh on Tue Dec 14, 2010 3:14 pm, edited 1 time in total.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Minor modifications to Menu

Post by M@rtijn »

You should have split these two questions in two different topics.

1)
Did you make this new stylesheet the default or hooked it to you template?

2)
Your post is a bit hard to understand, but my first thaught is that 'number_of_levels' is doing exactly what it is supposed to be doing, it shows you the all the pages from a certain level.
If I understand your first post correct you have 3 levels, but you want something from level 2 to show in level 3. That won't work.
You could use internal links (content type) to redirect to the right page.
Make your community a better place!
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

Sorry that I did not post as two different topics.

I have added the CSS code to the stylesheet that is hooked to the template. So, it is not the issue with finding the CSS definition.
.currentActiveLink {
color:#330099;
}

The issue is class="currentActiveLink" change done to the "simple_home.tpl" did not took effect. Viewing web page "source" in browser does not show this code. May be I am missing another step that will make template changes to kick in (just clicking on the 'import to database' and modifying the code is not enough I guess).

I will post the second issue as a different topic.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Minor modifications to Menu

Post by Dr.CSS »

You may not have read the default content where it explains some of the workings of the menu manager...

http://dezertdesign.com/default/index.p ... nu-manager

Most likely you never changed the menu call as imported to the DB menu templates don't heed the .tpl on the end when calling them, look in menu manager for your new imported menu and you will see the tag ready to copy/paste into your template...

The site you link to has a style.css that is actually just a copy of your whole site, HTML etc...

I would have started with a copy of the same menu template and style sheet that this uses...

http://dezertdesign.com/default/index.php?page=navleft
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

Thank You Dr.CSS. That helped (removing .tpl reference) solve the first issue. I inherited this work as the responsible person left.

I do not understand The site you link to has a style.css that is actually just a copy of your whole site, HTML etc... what this meant ....

The other issue I mentioned with "number_of_levels" can be noticed when you click on "Food for Thought" under "Triskeles Youth" in the left-side navigation. Notice that "Side by Side" also expands when "Food for Thought" is clicked. How do I resolve this issue ?

Site URL: http://triskeles.org
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Minor modifications to Menu

Post by Dr.CSS »

So you have more than 3 levels?...

http://triskeles.org/js/style.css
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

I may have more than 3 levels later but for now only 3 levels. If you have noticed, "Food for Thought" and "Side by Side" are parallel links but both expand displaying their child links when either of them is clicked.

I think I need to remove the reference to "style.css" in my template. I don't find that file under "js" folder in my "File Manager".

My CSS file is icluded with the following statement.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Minor modifications to Menu

Post by Dr.CSS »

I would remove the number of levels call to see if that helps...
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Minor modifications to Menu

Post by M@rtijn »

vayumahesh wrote: I think I need to remove the reference to "style.css" in my template. I don't find that file under "js" folder in my "File Manager".

My CSS file is icluded with the following statement.
That's actually only how it looks in the source of your page. CMSMS is not a flat file system, but a content management system (made simple, hence the name)

Your real css will probably be included with the command {stylesheet} or {cms_stylesheet} in your template.

Go to the admin for your website and go to "layout" -> "templates". I guess there will be more templates on your website, so you will have to look for the culprit.
Somewhere in your template header you'll find the line '', remove this and at least that problem is solved.  :D

I've been looking at your website and I see you managed to get the highlighting for active parent working. Good news!
One little thing that strikes me, thou, when I go to http://triskeles.org/js I see a Accordion menu. Is this actually the menu you are using on the front page as well?
That could be the problem your having with the levels, this is not a CMSMS menu.
Make your community a better place!
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

Dr. CSS and mr202020,
Thanks for your replies. It looks like the problem is not related to "number_of_levels" or "Accordion menu" (I am not using this menu). The numbers for the pages got screwed up. The navigation numbers for both "Side By Side" and "Food for Thought" was same, "4.2" and so both were expanding when either of them was clicked.

I tried to use "Up/Down" feature to change the order and see if the number issue will be fixed but no luck. Now "Internships" and "Food for Thought" have same number "4.1" and they have the same issue I mentioned.

Is there any way to change the number for the page manually ? My numbers are as follows now.

Triskeles Youth - 4
Internships - 4.1
Food for Thought - 4.1
Side by Side - 4.2
Youth Programs - 4.3

How do I fix the incorrect numbering ?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Minor modifications to Menu

Post by Dr.CSS »

Click the Reorder Pages button, click submit...
vayumahesh
Forum Members
Forum Members
Posts: 12
Joined: Mon Dec 13, 2010 9:50 pm

Re: Minor modifications to Menu

Post by vayumahesh »

Thanks Dr.CSS. That fixed the issue.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: [[Solved]] Minor modifications to Menu

Post by M@rtijn »

Awesome you were able to solve it!

But, there is still a call to that weird style.css file in your page source and a couple of html validation errors  ;)
You seem to have declared two charsets, both utf-8 as iso-8859-1.

If you remove these two lines from your template it makes it just a bit more neat

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Code: Select all

<link rel="stylesheet" type="text/css" href="js/style.css" />
Make your community a better place!
Post Reply

Return to “Modules/Add-Ons”