different class to active page in menu ?

sampsu

No avatar

2007-06-02 15:05

I have a layout for my shop, where i use class="active" to mark the active page in my menu (it has different backround)

Here is code example:


<ul>
    <
li><a href="index.html" class="active" title="Homepage">Homepage</a></li>
        <
li><a href="index.html" title="About US">About US</a></li>
    <
li><a href="index.html" title="shop">Shop</a></li>
    <
li><a href="index.html" title="Contact Us">Contact Us </a></li>
</
ul>



How can i use that in my template ? What would i need to put in my menu_1.tpl

» Quick.Cart v2.x

Now using Q.C 2.2

sampsu

No avatar

2007-06-04 08:13

Anyone ?

Now using Q.C 2.2

sampsu

No avatar

2007-06-04 09:02

What i mean is:

When page is active, then the class should be "active" in that link in menu

Now using Q.C 2.2

merci

No avatar

2007-06-04 11:21

sampsu - this mechanism is implemented already in Q.C. In templates/menu_1.tpl is block SELECTED where you can define special class for selected element.

sampsu

No avatar

2007-06-04 12:28

Thanks

Now using Q.C 2.2

vaikis

No avatar

2007-11-08 07:53

need example how to use this SELECTED block

Thanks.

merci

No avatar

2007-11-08 08:47

vaikis - in file templates/menu_1.tpl you will find block SELECTED. Into this block, you can put additional id or style for selected element, here is quick example of block SELECTED:

<!-- BEGIN SELECTED -->style="background-color:red;"<!-- END SELECTED -->

but better put here only id, and define it in templates/default.css file.

vaikis

No avatar

2007-11-08 10:06

thank you :) works perfect

Back to top
about us | contact