Created
September 27, 2013 12:33
-
-
Save timgauthier/6727917 to your computer and use it in GitHub Desktop.
Broken Menu for youcantwritethat.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// nested menu | |
$items = $pages->visible(); | |
// only show the menu if items are available | |
if($items->count() > 0): | |
?> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<?php endif ?> | |
</div> | |
<?php | |
// nested menu | |
$items = $pages->visible(); | |
// only show the menu if items are available | |
if($items->count() > 0): | |
?> | |
<?php foreach($pages->visible() AS $page): ?> | |
<?php $children = $page->children()->visible(); ?> | |
<?php if ($children->count() > 0 && $page->template() != 'blog'){ ?> | |
<li class="dropdown <?php ecco($page->isOpen(), ' active') ?>"> | |
<a data-target="#" href="<?php echo $page->uid(); ?>" class="dropdown-toggle " data-toggle="dropdown"><?php echo html($page->title()); ?> <i class="icon-angle-down"></i></a> | |
<ul class="dropdown-menu" role="menu"> | |
<li><a href="<?php echo $page->uid(); ?>"><?php echo html($page->title()); ?></a></li> | |
<?php foreach($page->children() AS $child): ?> | |
<li><a href="<?php echo $child->url(); ?>"><?php echo html($child->title()); ?></a></li> | |
<?php endforeach; ?> | |
</ul> | |
</li> | |
<?php } else{ ?> | |
<li <?php ecco($page->isOpen(), ' class="active"') ?>><a href="<?php echo $page->url() ?>"><?php echo html($page->title())?></a></li> | |
<?php } ?> | |
<?php endforeach ?> | |
</ul> | |
</div><!--/.nav-collapse --> | |
<?php endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment