You are here

function theme_archive_navigation in Archive 6

Same name and namespace in other branches
  1. 5 archive.inc \theme_archive_navigation()
  2. 7.2 archive.pages.inc \theme_archive_navigation()
  3. 7 archive.pages.inc \theme_archive_navigation()

Theme the archive navigation with years, months and dates by default.

1 theme call to theme_archive_navigation()
archive_page in ./archive.pages.inc
Fetch nodes for the selected date, or current date if none selected.

File

./archive.pages.inc, line 236

Code

function theme_archive_navigation($type, $date) {
  $output = "<div id=\"archive-container\"><dl><dt>" . t('Date') . "</dt><dd>\n";
  $output .= theme('archive_navigation_years', $type, $date);
  if (_archive_validate_date($date->year)) {
    $output .= theme('archive_navigation_months', $type, $date);
  }
  if (_archive_validate_date($date->year, $date->month)) {
    $output .= theme('archive_navigation_days', $type, $date);
  }
  $output .= "</dd>";

  // Only display node type filter if more than one node type represented
  if (sizeof(_archive_node_types($date)) > 1) {
    $output .= "<dt>" . t('Type') . "</dt><dd>\n";
    $output .= theme('archive_navigation_node_types', $type, $date);
    $output .= "</dd>";
  }
  $output .= "</dl></div>\n";
  return $output;
}