Page 1 of 1

[Solved] make active menu item a link

Posted: Tue Aug 19, 2008 7:15 am
by Shanma
Hi,

I am using the {menu} tag to display menus and I'm having a problem with the active menu item.

The active menu item isn't recognised as a link and therefore doesn't inherit the css style of 'a' or even 'a:active'. Instead it has the default formatting of 'h3'.

I can change the style for h3 but this is not ideal as it still doesn't act like a link (I want it to react like other menu items on hover).

My question is, how can I make the active menu item a link so that it will use the same styles as other menu items?

Thank you.

Re: make active menu item a link

Posted: Tue Aug 19, 2008 7:28 am
by Dr.CSS
Use a custom menu template or use minimal_menu.tpl...

Look at bold words below \/ on how to do it if not sure...

Re: make active menu item a link

Posted: Tue Aug 19, 2008 12:26 pm
by christiaans
mark wrote: Use a custom menu template or use minimal_menu.tpl...

Look at bold words below \/ on how to do it if not sure...
True, it takes just a little bit of reading the help files in most cases.

Just to get you started:

Code: Select all

{if $node->current == true} 
<a href=......

{/if}
There you go.

Re: [solved] make active menu item a link

Posted: Wed Aug 20, 2008 4:39 am
by Shanma
Thank you, specifying the template as minimal_menu.tpl did the trick.

Just a question: if no template is specified in the tag which template is used?

Re: [Solved] make active menu item a link

Posted: Wed Aug 20, 2008 7:07 am
by Dr.CSS
I believe...

simple_navigation.tpl