By Mavros Gatos on
Do you know how to do it? Picture illustrates my question:
http://img140.imageshack.us/img140/412/menuqg0.gif
Do you know how to do it? Picture illustrates my question:
http://img140.imageshack.us/img140/412/menuqg0.gif
Comments
override theme_menu_item
In includes/menu.inc:
You can override this in your theme's template.php something like
However it will depend on how you're displaying your menu which functions it goes through, so no guarantees
--Zivtech--
Primary+Secondary and another Primary+Secondary
Thank you. And I have another question: is it possible to make two blocks of "Primary+Secondary links".
Correct 2 small errors
Got error
warning: Invalid argument supplied for foreach() inHmm, doesn't work for me.
Does anyone have working code for this?
I am not a php guru and I stuck this in my template.php but it didn't work.
is this code working or is it something I am doing wrong?
I am trying to style my menu so that when a child link is active then the parent will be active also
that is have the css class "active"
Thanks
----------------------------------------------------
My Site
----------------------------------------------------
CraigBertrand.com
solutions with path module
It works with drupal path module. Simle solution - I hope it's near the Drupal standard :P
In this case the code is checking if $link_item['path'] is corresponding with the query URL ($_REQUEST['q']).
This is working with only three level deep menustructure, in this path case:
products
products\product1
products\product1\product11
products\product2
products\product2\product21
products\product2\product22
products\product2\product23
products\product3
The nodes have to use the path above.
It gives an extra 'actual' class to '<a>' tag, which can be designed in CSS.
Use this in Your template.php:
correcting my code
Hi,
I was correcting my code. It still uses the path module, but doesn't depends on deep levels of the path.
So You can use: products/subproducts1/subproduct11/product1/product11 stc.
This compare the actual URL and menu item's path and if it can find matching, remark the link with an 'actual' class.