<?php if (!empty($secondary_links)): ?>
<div id="secondary" class="clear-block">
<?php print theme('links', $secondary_links, array('class' => 'links secondary-links')); ?>
</div>
<?php endif; ?>
这里好像是 只能在page.tpl.php文件中才会起作用
<?php if (isset($primary_links)) : ?>
<?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
<?php endif; ?>
<?php if (isset($secondary_links)) : ?>
<?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>
<?php endif; ?>
<?php if ($main_menu || $secondary_menu): ?>
<div id="navigation"><div class="section">
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Main menu'))); ?>
<?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
</div></div> <!-- /.section, /#navigation -->
<?php endif; ?>
• $primary_links: 一个包含了一级链接的数组。可在“管理➤站点构建➤菜单”中定义它们。通常$primary_links通过函数theme('links')来定制输出的样式,如下所示:
<?php
print theme('links', $primary_links, array('class' => 'links primary-links'))
?>
8)主菜单(Primary links
在模板中,使用$primary_links输出的ul列表
9)次链接(Secondary links
在模板中,使用$secondary_links输出的ul列表