You are here

function theme_node_hierarchy_item_list in Node Hierarchy 6

Same name and namespace in other branches
  1. 5 nodehierarchy_theme.inc \theme_node_hierarchy_item_list()

Return a themed list of items.

1 theme call to theme_node_hierarchy_item_list()
theme_nodehierarchy_node_list in ./nodehierarchy_theme.inc
Display a list of nodes with nodehierarchy actions

File

./nodehierarchy_theme.inc, line 137
Nodehierarchy theming functions

Code

function theme_node_hierarchy_item_list($items = array(), $attributes = NULL) {
  if (!empty($items)) {
    $output .= "<ul" . drupal_attributes($attributes) . '>';
    foreach ($items as $item) {
      $attributes = array();
      if (is_array($item)) {
        foreach ($item as $key => $value) {
          if ($key == 'data') {
            $data = $value;
          }
          elseif ($key == 'children') {
            $children = $value;
          }
          else {
            $attributes[$key] = $value;
          }
        }
      }
      else {
        $data = $item;
      }
      $output .= '<li' . drupal_attributes($attributes) . '>' . $data . '</li>';
    }
    $output .= "</ul>";
  }
  return $output;
}