Hi,
The secondary links are missing in page.tpl.php.

I changed

  <div id="wrapper">
    <?php if ($sky_title): ?>

into:

  <div id="wrapper">
    <!--veg: 02-02-2009 added missing secondary link -->
    <?php if ($secondary_links): ?>
      <div id="secondary-links"><?php print theme('links', $secondary_links); ?></div>
    <?php endif; ?>
    <?php if ($sky_title): ?>

So the secondary links are shown in the top right corner (we use them to show the login/out & search links).

Comments

aimutch’s picture

Secondary links are not used in this theme.

wvd_vegt’s picture

Hi,

That should not hold you back from rendering them if present (or am i missing something). It's just strange that if you enable them, they do not show up. Thats something else than not liking them or using them

We use the secondary links (located at the top right corner) for login & search links and it looks pretty good at that spot.

prosiktuno’s picture

can you show how it's look?
Thx.

wvd_vegt’s picture

StatusFileSize
new6.61 KB

Hi,

See the attached picture...

magenbrot’s picture

Hi wvd_vegt,

I also would like to have the secondary menu enabled. I've tried your code but it doesn't work for me. The secondary-links are enabled in the theme configuration. What am I doing wrong?

regards,
Oliver

wvd_vegt’s picture

Hi,

Did you also move some menu items to this menu? (you can verify it by setting the theme to default for a while). Unless you made some typing errors it 'should' work.

For debugging you could also change:

print theme('links', $secondary_links);

into

print 'SECONDARYLINKS';

for a while. It should show up at the top of the screen.

magenbrot’s picture

I've found my error. I had the source of the secondary links set to primary links on the config page of the menus.
Now the menu is shown. Thank you!

jacine’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Closed (fixed)
agerson’s picture

Category: support » feature
Status: Closed (fixed) » Needs review

I added this to page.tpl.php to get secondery links where I would like them. I think this is be a nice place to have them in the supported theme. At least as an option for those who want them.

<?php if ($site_slogan): ?>
          <span id="slogan"><?php print $site_slogan; ?></span>
        <?php endif; ?>
       <!-- added missing secondary link -->
        <?php if ($secondary_links): ?>
          <div id="secondary-links"><?php print theme('links', $secondary_links); ?></div>
        <?php endif; ?>
        <!-- end add-->
      </div>
      <?php if ($primary_links): ?>

I also added this to style.css

#secondary-links {
	float: right;
	display: inline;
}

#secondary-links a{
	color: #fff;
}
jacine’s picture

Assigned: Unassigned » jacine
Status: Needs review » Needs work
jacine’s picture

Status: Needs work » Closed (fixed)

Secondary links can easily be added via blocks to any region, so I don't see a need to add them manually to the theme, especially because I can't guess which sidebar they should be added too.

magenbrot’s picture

StatusFileSize
new251.04 KB

HI, look at the attached screenshot, this isn't possible with blocks. I like this theme very much, so I'll stay with my optimized 6.x-2. goodbye Jacine.

agerson’s picture

magenbrot, #9 should still work in the new version.

Netbuddy’s picture

Im trying to display a secondary links bar at the top of the page. Everything appears ok, but if you have child items under top level menu items in secondary links, and also have child items under top level menu items in primary links...the primary link child items will not display.

Relevant page.tpl.php code...

 <div id="wrapper">
    <div<?php print $header_attributes; ?>>
      <div id="header-inner">
      <?php if ($secondary_links): ?>
      <div id="navigation"><?php print $secondary_links; ?></div>
    <?php endif; ?>
        <?php if ($logo): ?>
        <a href="<?php print $base_path; ?>" title="<?php print $site_name; ?>" id="logo"><img src="<?php print $logo; ?>" alt="<?php if ($site_name): print $site_name;  endif; ?>" /></a>
        <?php endif; ?>
        <?php if ($site_name): ?>
        <span id="site-name"> <a href="<?php print $base_path; ?>" title="<?php print $site_name; ?>"><?php print $site_name; ?></a> </span>
        <?php endif; ?>
        <?php if ($site_slogan): ?>
          <span id="site-slogan"><?php print $site_slogan; ?></span>
        <?php endif; ?>
      </div>
    </div>
    <?php if ($primary_links): ?>
      <div id="navigation"><?php print $primary_links; ?><?php print $search_box; ?></div>
    <?php endif; ?>

Added the following to template-settings.php

'sky_nav_alignment_secondary' => 'center',

and...

// Alignment of Navigation
  $form['layout']['sky_nav_alignment_secondary'] = array(
    '#type' => 'select',
    '#title' => t('Secondary Navigation Alignment'),
    '#default_value' =>  $settings['sky_nav_alignment_secondary'],
    '#options' => array(
      'left' => t('Left'),
      'right' => t('Right'),
      'center' => t('Center'),
    ),
    '#description' => t('The alignment of the Secondary navigation bar.'),
  );

Also added this to preprocess page..

if ($vars['secondary_links']) {
  // Find out which menu is being used for primary links and create the menu tree
  $pid = variable_get('menu_secondary_links_source', 'secondary-links');
  $tree = menu_tree($pid);
  $tree = str_replace(' class="menu"', '', $tree);

  // Find out how the navigation is aligned, and prepard the output
  $navigation_alignment_secondary = theme_get_setting('sky_nav_alignment_secondary');
  $vars['secondary_links'] = '<del class="wrap-'. $navigation_alignment_secondary .'">'. $tree .'</del>';
}

Top level menu items appear fine in the primary menu, but child items simply do not show...I must be leaving something out? or done too much...dunno.

Netbuddy’s picture

Status: Closed (fixed) » Active
jacine’s picture

You can't have both at the same time, because with dropdowns on the menu settings page you need to make the primary menu the same menu for primary and secondary. If you want to show another copy the navigation or any menu for that matter, just use the menu_block module. It will let you create menu blocks and gives you many difference options on how to display them. http://drupal.org/project/menu_block

Also, in case someone else comes across this, the route you were taking to add secondary links is wrong. You would use the method in #9 to add this in page.tpl.php.

jacine’s picture

Status: Active » Closed (fixed)