You are here

function views_plugin_style_lineage_nested::header in Taxonomy Lineage 6

Same name and namespace in other branches
  1. 7 plugins/views_plugin_style_lineage_nested.inc \views_plugin_style_lineage_nested::header()
1 call to views_plugin_style_lineage_nested::header()
views_plugin_style_lineage_nested::nested_list in ./views_plugin_style_lineage_nested.inc

File

./views_plugin_style_lineage_nested.inc, line 236
Views style plugin that allows a view to be rendered as a nested list, based on Lineage's term hierarchy.

Class

views_plugin_style_lineage_nested
Implements views_plugin_style.

Code

function header($header, $depth) {

  // Use a header tag if possible; else use a class indicating header depth.
  if ($depth <= 6) {
    return "<h{$depth}>" . stripslashes($header) . "</h{$depth}>\n";
  }
  else {
    return "<span class=\"h{$depth}\">{$header}</span>\n";
  }
}