Make active menu item clickable

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
volcanoboy

Make active menu item clickable

Post by volcanoboy »

Hey,

using CMS Made Simple 0.13 "Canary" and horizontal and vertical css menu.

Say I have Home - Products - Contact, when i click Products it's no longer possibele to click the Products menu link to refresh the page or get back to the product index (if i have subpages). where do i make it so all menu links are clikable at all times, no matter where I am ión the site?

Cheers
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Make active menu item clickable

Post by Dr.CSS »

Look at the page source to see what the li looks like it must have something to do with the Menu manager template not making it a link missing ...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Make active menu item clickable

Post by Dee »

Heh, reminds me of this post...

The way the menu items is displayed is set in your menu template. Take a look under "Layout" => "Menu Manager" (and Menu Manager help).
You're probably using one of the default (file) templates now, then you'd have to:
* make a copy of the menu template used in (the menu module call in) your page template
* change the menu module call in your template to use the new menu template (use the name you used while copying and remove .tpl)

Assuming you're using the simple_navigation template (the active menu item is clickable in the cssmenu) the code for the menu item for the current page is here:

Code: Select all

{if $node->current == true}
<li class="currentpage"><h3><dfn>Current page is {$node->hierarchy}: </dfn>{$node->menutext}</h3>
{elseif $node->parent == true}
between {if $node->current == true} and {elseif $node->parent == true}.
Change it to

Code: Select all

{if $node->current == true}
<li class="currentpage"><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}><dfn>Current page is {$node->hierarchy}: </dfn>{$node->menutext}</a>

{elseif $node->parent == true}
and change your style definitions for div#menu_horiz h3 in the Navigation: Simple stylesheets to div#menu_horiz a.currentpage
golem0r

Re: Make active menu item clickable

Post by golem0r »

[edit] SOLVED (thanks to streever from #cms IRC)

not div#menu_vert a.currentpage but div#menu_vert ul li.currentpage a

[orig question follows]

Forgive my ignorance of css, but I'm trying to do a similar thing here using the simple_navigation menu template and the vertical menu.

I'd like the current page to be clickable, but otherwise styled exactly the same.  I imported the simple nav template,  changed the code for {if $node->current == true} as per Dee's excellent instructions, and specified it in a call in the {menu ...} tag in the layout template, but am just not clear on the css.

I think I have to modify the following css defn, but when I redefined it as div#menu_vert a.currentpage, the current page IS clickable (yay!) but loses the styling that current pages had in the vanilla simple nav vert menu.

Code: Select all

/* 
current pages in the default Menu Manager 
template are unclickable. This is for current page on first level 
*/
div#menu_vert ul h3 {
   background: url(images/cms/arrow-right-active.gif) no-repeat 0.4em center;
   background-color: #385C72;
   display: block; 
   padding: 0.8em 0.5em 0.8em 1.5em;  /* some air for it */
   color: #fff;                                 /* this will be link color for all levels */
   font-size: 1em;                           /* instead of the normal font size for <h3> */
   margin: 0;                                  /* as <h3> normally has some margin by default */
}
This is my first post on the forums, so please do let me know if I've done anything non-kosher.  Thanks for any advice!
Last edited by golem0r on Mon Feb 04, 2008 9:41 pm, edited 1 time in total.
Locked

Return to “CMSMS Core”