I need to create a custom block (or is it region?) on the left side of my theme that would contain a menu I created for specific pages.

I am running Drupal 6.8. I went into the .info file and added a region called "leftsidenav".

I then created a block called "leftsidenav" and a new menu called "leftsidenav" and put pages into it.

Now if I use the default "print $left" it displays the menu because I put that block into the left side.

But it displays it along with everything else that's attached to the left side...and I want some custom css on this menu.

How do I get it to display by itself? For example "print $leftsidenav" (which doesn't work).

Comments

chrisopeterson’s picture

When you create a new block or menu it is automatically given an id, you can also insert other identifying divs or classes into your block when you create it. Targeting CSS to a certain menu or block is not difficult.

As for the print $left issue I really don't understand. What wrong with printing the left side? If you don't want the other blocks there then don't have them in the left side. If you want them on the left but want them in a different region then thats another matter.

http://drupal.org/node/171224

http://inletmedia.com

yakker’s picture

I'm pretty sure <?php print $leftsidenav;?> should work. I've done the same thing: defined a few new regions in my .info file and then called them with the php print(); function inside my own page.tpl.php.

But you do need that - you need a template file for your theme so that you can call the new region variable. And you will also need to go to Admin>>Blocks and assign various content to those regions (the .info file setup should give you those regions in the Admin>>Blocks area and should tell drupal to write whatever content you assign to those regions into their region variables).

Hope that helps!