You are here

function _regions_top_nav_output in Regions 7

Helper function to position outut for top nav, a static area

1 call to _regions_top_nav_output()
regions_top_nav_regions_region_alter in modules/regions_top_nav/regions_top_nav.module
Implements hook_regions_region_alter().

File

modules/regions_top_nav/regions_top_nav.module, line 201
Add a top nav bar for dropping blocks into.

Code

function _regions_top_nav_output() {
  $output = '';

  // build system path
  $output .= '<div id="regions_top_nav_system_path" class="region_content">' . _regions_top_nav_system_path() . '</div>';

  // if annonymous, display a login link
  if (user_is_anonymous()) {
    $output .= '<div id="regions_top_nav_user_menu" class="region_content">' . l(t('Login'), 'user/login') . '</div>';
  }
  else {

    // wrap name to offset it from the piture
    global $user;
    $rendername = $user->name;
    $output .= '<div id="regions_top_nav_user_menu" class="region_content"><span>' . $user->name . '</span><span>' . l(t('Logout'), 'user/logout') . '</span></div>';
  }
  $output .= '<div id="regions_top_nav_notifications" class="region_content">' . theme('status_messages') . '</div>';
  return $output;
}