I'm attempting to custom theme my navigation menu. I was poking around in the "bluebreeze" theme and it appears that they call:

theme('menu_links', $primary_links)

from 'page.tpl.php.' They don't have any override (that i can see) in their 'template.php' file. This means that they are using from 'theme.inc' right? But there is no 'theme_menu_links()' in there, only 'theme_links()'...wha?

Anyway, i overrode my primary links by writing a themename_primary_links() in my template.php file and calling it via theme('primary_links', $primary_links) in my page.tpl.php file, and that was fine. But for my navigation links, they are built inside of a block in sidebar_left. How do I ever call my theme override? Should I override the user block with a block-user.tpl.php file like:

if ($block->title == "Navigation") {
theme('nav_theme', $primary_links)
}
else {
// regular block themeing
}

but the $primary_links isn't available here is it? Should I just global it? Has anyone else themed their nav links? How did you do it?

Comments

Anonymous’s picture

... http://geeksandgod.com/forum/general-discussion-18

Also, if you take a look at the lullabot.com site, and use something to look at their CSS (firefox web developer toolbar for example), you'll get some additional hints at making this work (they have different blocks, themed differently).

I'm not an expert, but basically:

- Define your menu in the menu section of admin.
- go into the blocks section of admin to find out the block ID that's automatically created for the menu block you just created.
- use that block ID in your CSS to custom theme that block.

I did this for the first time on a new site I'm messing with and it went pretty smoothly.

My example is here - http://cristinaregadas.com/

The left menu block is block 96 so you'll see I refer to it as 'block-menu-96' in the CSS.

Steve

Anonymous’s picture

... http://geeksandgod.com/forum/general-discussion-18

Also, if you take a look at the lullabot.com site, and use something to look at their CSS (firefox web developer toolbar for example), you'll get some additional hints at making this work (they have different blocks, themed differently).

I'm not an expert, but basically:

- Define your menu in the menu section of admin.
- go into the blocks section of admin to find out the block ID that's automatically created for the menu block you just created.
- use that block ID in your CSS to custom theme that block.

I did this for the first time on a new site I'm messing with and it went pretty smoothly.

My example is here - http://cristinaregadas.com/

The left menu block is block 96 so you'll see I refer to it as 'block-menu-96' in the CSS.

Steve

Anonymous’s picture

... I don't seem to have permissions to delete it.