I am trying to use theme_links() on the side navigation, not primary or secondary links (as shown here:
http://drupal.org/node/64292#menu-links)

My overall goal is to style each link with a unique background image. In my page.tpl.php, I only have print $sidebar_left and I don't know how to get at the menu block. How might I go about doing this?

Comments

ainigma32’s picture

Status: Active » Fixed

It's been a while but here goes anyway...

If you just want to style the links, the fastest and easiest way is using CSS.
Use Firebug to get the classname of the block that holds your navigation. Probably:

.block .block-menu {

}

Now you can access the links with

.block .block-menu li.leaf a:link, 
.block .block-menu li.leaf a:visited,
.block .block-menu li.leaf a.active,
.block .block-menu li.leaf a:hover {
  text-decoration: line-through;
}

You could target just one menu block (with id 51) by using:

#block-menu-51 {

}

The drawback is that you have to modify your theme if the block id is ever changed.

If you want to do it the Drupal way aka The Right WayTM see here http://drupal.org/theme-guide/5 and here http://drupal.org/node/22803

HTH

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.