You are here

function theme_finder_links in Finder 7

Same name and namespace in other branches
  1. 6 includes/finder.inc \theme_finder_links()
  2. 6 includes/finder.theme.inc \theme_finder_links()

Theme the finder links.

Parameters

$variables['finder']: The finder object.

1 theme call to theme_finder_links()
finder_view in ./finder.module
Generate display of a given finder.

File

includes/finder.theme.inc, line 85
Theme functions for the finder module.

Code

function theme_finder_links($variables) {
  $finder = $variables['finder'];
  $output = '';
  $links = array();
  foreach ($finder->links as $path => $title) {

    // don't show this link if the current path starts with $path
    if (strpos($_GET['q'], $path) !== 0) {
      $links[] = l($title, $path);
    }
  }
  if (!empty($links)) {
    $output .= '<div id="finder-links-' . $finder->finder_id . '"
              class="finder-links">';
    $output .= theme('item_list', array(
      'items' => $links,
      'attributes' => array(
        'class' => 'links',
      ),
    ));
    $output .= '</div>';
  }
  return $output;
}