You are here

function footermap_theme_map in footermap: a footer site map 5.2

Theme a given menu block if menu_headers are enabled and the path is empty.

Parameters

menu array containing links under a certain tree:

menuattributes css attributes:

linkattributes css attributes:

Return value

string html-formatted string

1 call to footermap_theme_map()
_footermap_render in ./footermap.module
Render function for footermap

File

./footermap.module, line 296
This module queries the menu for pages and makes a dynamic sitemap at the bottom of the page.

Code

function footermap_theme_map($menu, $menuattributes, $linkattributes) {
  $arrcnt = 0;
  $ret = '';
  foreach ($menu as $path) {
    if ($path['href'] == '' && $arrcnt == 0) {

      // this should always be the first element in the array... hopefully...  nasty bug?
      $ret .= "<ul>\t<li " . drupal_attributes($menuattributes) . ">" . $path['title'] . "</li>\n";
    }
    else {
      $ret .= "\t<li " . drupal_attributes($linkattributes) . ">" . l($path['title'], $path['href'], $attributes) . "</li>\n";
    }
    $arrcnt++;
  }
  $ret .= "</ul>\n";
  return $ret;
}