[Solved] make active menu item a link

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Shanma
New Member
New Member
Posts: 5
Joined: Thu Jan 31, 2008 1:58 am

[Solved] make active menu item a link

Post 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.
Last edited by Anonymous on Wed Aug 20, 2008 6:43 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: make active menu item a link

Post 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...
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: make active menu item a link

Post 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.
Shanma
New Member
New Member
Posts: 5
Joined: Thu Jan 31, 2008 1:58 am

Re: [solved] make active menu item a link

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [Solved] make active menu item a link

Post by Dr.CSS »

I believe...

simple_navigation.tpl
Post Reply

Return to “Layout and Design (CSS & HTML)”