Skip to content

Instantly share code, notes, and snippets.

@starckio

starckio/menu.php

Last active Mar 18, 2017
Embed
What would you like to do?
Correct - Theme Roon
<nav role="navigation">
<ul class="menu cf">
<?php foreach($pages->visible() as $p): ?>
<li>
<a <?php e($p->isOpen(), ' class="active"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a>
</li>
<?php endforeach ?>
<?php foreach($site->languages() as $language): ?>
<li>
<a<?php e($site->language() == $language, ' class="active"') ?> href="<?php echo $page->url($language->code()) ?>"><?php echo html($language->name()) ?></a>
</li>
<?php endforeach ?>
</ul>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment