summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnAlbin2011-11-25 09:47:39 (GMT)
committer JohnAlbin2011-11-25 09:58:07 (GMT)
commit9eaf9205d3f0f4ef5421902a1003fce232f23c13 (patch)
tree08a14d55529771e6ba8ef8c1a5463fb36f9f57b6
parentae1f05b50ed8161ae9f289e1d5d38af88f7ce27e (diff)
Add nav element around main and secondary menu links
-rw-r--r--templates/page.tpl.php55
1 files changed, 31 insertions, 24 deletions
diff --git a/templates/page.tpl.php b/templates/page.tpl.php
index ce65f88..983af94 100644
--- a/templates/page.tpl.php
+++ b/templates/page.tpl.php
@@ -92,18 +92,21 @@
</hgroup><!-- /#name-and-slogan -->
<?php endif; ?>
- <?php print theme('links__system_secondary_menu', array(
- 'links' => $secondary_menu,
- 'attributes' => array(
- 'id' => 'secondary-menu',
- 'class' => array('links', 'inline', 'clearfix'),
- ),
- 'heading' => array(
- 'text' => $secondary_menu_heading,
- 'level' => 'h2',
- 'class' => array('element-invisible'),
- ),
- )); ?>
+ <?php if ($secondary_menu): ?>
+ <nav id="secondary-menu">
+ <?php print theme('links__system_secondary_menu', array(
+ 'links' => $secondary_menu,
+ 'attributes' => array(
+ 'class' => array('links', 'inline', 'clearfix'),
+ ),
+ 'heading' => array(
+ 'text' => $secondary_menu_heading,
+ 'level' => 'h2',
+ 'class' => array('element-invisible'),
+ ),
+ )); ?>
+ </nav>
+ <?php endif; ?>
<?php print render($page['header']); ?>
@@ -132,18 +135,22 @@
<div id="navigation"><div class="section clearfix">
- <?php print theme('links__system_main_menu', array(
- 'links' => $main_menu,
- 'attributes' => array(
- 'id' => 'main-menu',
- 'class' => array('links', 'inline', 'clearfix'),
- ),
- 'heading' => array(
- 'text' => t('Main menu'),
- 'level' => 'h2',
- 'class' => array('element-invisible'),
- ),
- )); ?>
+ <?php if ($main_menu): ?>
+ <nav id="main-menu">
+ <?php print theme('links__system_main_menu', array(
+ 'links' => $main_menu,
+ 'attributes' => array(
+ 'class' => array('links', 'inline', 'clearfix'),
+ ),
+ 'heading' => array(
+ 'text' => t('Main menu'),
+ 'level' => 'h2',
+ 'class' => array('element-invisible'),
+ ),
+ )); ?>
+ </nav>
+ <?php endif; ?>
+
<?php print render($page['navigation']); ?>