Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Well, if nobody wants to help swapnaj ;-) then help me! I'm facing the same challenge. I want to use images (three of the images states: not choosen, choosen and mouse-over) in stead of the text links in the primary menu. Furthermore I want to control the exact location. I started with the pixture_reloaded theme which I've converted into something else. The development site is currently located on euax.org.
Found this to be a way to give every menu link a unique id, which can then be styled with css. (Using the desired image as a background image.) Would rather just add the id to primary links, and give a more logical numbering system, but this works. Apply css styles with identifiers such as "#menu-link-176" and "#menu-link-176:hover".
Add this to your theme's template.php, switching "theme" with the name of your theme.
function theme_menu_item_link($link) {
if (empty($link['localized_options'])) {
$link['localized_options'] = array();
}
$link['localized_options']['attributes']['id'] = 'menu-link-'.$link['mlid'];
return l($link['title'], $link['href'], $link['localized_options']);
}
Comments
helpme plz
helpme plz
Well, if nobody wants to help
Well, if nobody wants to help swapnaj ;-) then help me! I'm facing the same challenge. I want to use images (three of the images states: not choosen, choosen and mouse-over) in stead of the text links in the primary menu. Furthermore I want to control the exact location. I started with the pixture_reloaded theme which I've converted into something else. The development site is currently located on euax.org.
would also like help with
would also like help with this. at least with adding unique ids to primary links (in a zen subtheme) so perhaps i can pull it off with css.
i've seen many requests for help with this, but i haven't found a solution for drupal 6 in a zen subtheme.
Found this to be a way to
Found this to be a way to give every menu link a unique id, which can then be styled with css. (Using the desired image as a background image.) Would rather just add the id to primary links, and give a more logical numbering system, but this works. Apply css styles with identifiers such as "#menu-link-176" and "#menu-link-176:hover".
Add this to your theme's template.php, switching "theme" with the name of your theme.
Not too familiar with jQuery or I would try that.
Hi, i use Jquery for
Hi,
i use Jquery for dynamically replace title of link. I identify my primary menu and then replace element with Image.
By
Yto