You are here

function theme_domain_nav_ul in Domain Access 7.2

Same name and namespace in other branches
  1. 5 domain_nav/domain_nav.module \theme_domain_nav_ul()
  2. 6.2 domain_nav/domain_nav.module \theme_domain_nav_ul()
  3. 7.3 domain_nav/domain_nav.module \theme_domain_nav_ul()

Themes the domain list as an unordered list of links.

Parameters

$variables: An array of information about each domain.

File

domain_nav/domain_nav.module, line 259
Navigation block and menu options for Domain Access

Code

function theme_domain_nav_ul($variables) {
  $options = $variables['options'];
  foreach ($options as $key => $value) {
    isset($value['active']) ? $active = 'active' : ($active = '');
    $class = "domain-id-" . $value['domain_id'] . " " . $active;
    $items[] = l($value['sitename'], $value['path'], array(
      'attributes' => array(
        'class' => $class,
      ),
    ));
  }
  return theme('item_list', array(
    'items' => $items,
  ));
}