WebsiteBaker Support (2.8.x) > Templates, Menus & Design

a:current?

(1/5) > >>

Ogierini:
Hi

I have a question about the menu css.
I would like to have a hover, no problem. But than as well I would like on the active page, the page you visite a t that moment: a little symbol appears in the menu.
It can't be a:visited because when visited al pages have the symbol in the menu.
I thought a:current but it doesn't exist?

Can someone help out?

Bramus:
wasnt this menu-current?

Stefek:
Hello Irene.

You'll need to apply the css class to these List Items or to the A Tags of the current pages.

See the example ( by $aItemOpen):

--- Code: ---<?php 
  show_menu2( 
    $aMenu   = 0,
    $aStart = SM2_ROOT,
    $aMaxLevel = SM2_CURR+1,
    $aOptions = SM2_ALL,
    $aItemOpen = &#39;<li [if(class==menu-current){class="active"}]>[if(class==menu-current) { [a]<span>[menu_title]</span>} else {[a][menu_title]}]</a>&#39;,
    $aItemClose = &#39;</li>&#39;,
    $aMenuOpen = &#39;<ul class="mymenu">&#39;,
    $aMenuClose = &#39;</ul>&#39;,
    $aTopItemOpen = false,
    $aTopMenuOpen   = false
  );
?>

--- End code ---

This is just a example.

You also can use the standard SM2 behaviour, as roposed by Bramus in the post above.

However, you should read the SM2 documentation in order to fully understand this topic.

Kind Regards,
Stefek


Ogierini:
gonna try ! Thanks, guys, let you know!

Ogierini:
Ai doesn't work yet.

If you klick the logo appears but it should only appear when it is the page in question

http://www.idealcooking.nl/cms

Navigation

[0] Message Index

[#] Next page

Go to full version