theme_domain_nav_default

Versions
domain
theme_domain_nav_default($options)

Themes the domain list as a JavaScript selection form.

  • domain_id -- the unique identifier of this domain
  • subdomain -- the host path of the url for this domain
  • sitename -- the human-readable name of this domain
  • path -- the link path (a Drupal-formatted path)
  • active -- a boolean flag indicating the currently active domain

If hook_domainnav() is invoked, additonal elements may be present.

Parameters

$options An array of information about each domain. Options contain the following:

Code

domain_nav/domain_nav.module, line 225

<?php
function theme_domain_nav_default($options) {
  global $_domain;
  $current = $options[$_domain['domain_id']];
  $output = '<form class="domain-list" action="">';
  $output .= '<select onchange="if (this.value) location.href=this.value;">';
  $output .= '<option value="'. $current['path'] .'">'. t('Jump to...') .'</option>';
  foreach ($options as $key => $value) {
    (isset($value['active'])) ? $selected = ' selected' : $selected = '';
    $output .= '<option value="'. $value['path'] .'"'. $selected .'>'. filter_xss_admin($value['sitename']) .'</option>';
  }
  $output .= '</select>';
  $output .= '</form>';
  return $output;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List