By ryan.nauman on
I am trying to customize my primary links menu when it is displayed within a block. theme_menu_tree is really what I am after but the only available variable from within that is $tree which doesn't help very much. I want the ul that is returned from this function to also have a class that matches the blockname it is contained in. $block->delta offers this information but how do I get that inside my theme_menu_tree's scope? I don't see any preprocess functions that would affect this function.
Help appreciated
Comments
There used to be a module
There used to be a module that did this, but I forget what it's called, and am unsure as to its compatibility with various versions of Drupal. The easiest and most direct way to place the contents of a block in a page are using the following PHP snippet:
Placing any Drupal block within a node
In this particular example, we're displaying a menu block with ID 26 inside a page. Here's how you use this code snippet to insert any block (this example uses Drupal 5.x; for other Drupal versions, the process should be similar):
* Browse to Site Building -> Blocks -> List
* Browse over the "configure" link next to your block
This will reveal the following address line (in this example we are using a custom block with ID 26)
/admin/build/block/configure/block/26
the last two variables are the ones we're interested in: /block/26