Menu

Aquasoft / MGP-Forum style CSS background graphical menu for Drupal primary links

Key words and phrases: 
Aquasoft primary links CSS images php strip punctuation aquasoft css template.php punctuation function remove periods exclamation points
Description & Info: 

We first used this technique from the aquasoft theme on a 4.7 site, MGP-Forum, and just used it again, updated for Drupal 5 and with one enhancement by us.

Here's the D5 version from Aquasoft:

<?php
function aquasoft_primary_links() {
$links = menu_primary_links();
if ($links) {
foreach ($links as $link) {
$cssid = str_replace(' ', '_', strip_tags($link));

Show menu in page

Key words and phrases: 
display drupal menu within node print part of menu tree within content menu view inside
Description & Info: 

Set the input format for your node body or other textarea to PHP code, figure out what the menu ID of the menu item you care about as described by Nick Lewis (from whom all of this is stolen), and then stick this in your content:

<?php
$html
= theme_menu_tree(42);
print
$html;
?>

by Benjamin Melançon
Posted on Wed, 2008-05-21 13:10
in