我是drupal的新手,想通过以下方法在drupal主菜单的锚标记中添加唯一ID,假设我有一个页面“websiteurl/team”,我希望锚标记为
<a id="team" href="/team">Team</a>
我正在使用此代码来显示 drupal 的主菜单。
<div<?php print $attributes; ?>>
<div<?php print $content_attributes; ?>>
<?php if ($main_menu || $secondary_menu): ?>
<nav class="navigation">
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix', 'main-menu')), 'heading' => array('text' => t('Main menu'),'level' => 'h2','class' => array('element-invisible')))); ?>
<?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix', 'secondary-menu')), 'heading' => array('text' => t('Secondary menu'),'level' => 'h2','class' => array('element-invisible')))); ?>
</nav>
<?php endif; ?>
<?php print $content; ?>
</div>
</div>
请让我知道这怎么可能