Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- function render($page)
- {
- echo '<li>';
- echo HTML::anchor($page->uri, $page->nav);
- if ($page->has_children())
- {
- echo '<ul>';
- foreach ($page->children() as $c):
- render($c);
- endforeach;
- echo '</ul>';
- }
- echo '</li>';
- } // End render
- ?>
- <div class="navigation">
- <ul id="jMenu">
- <?php foreach ($pages as $p):
- if ($p->is_root()): ?>
- <li>
- <?php echo HTML::anchor($p->uri, $p->nav, array('class' => 'fNiv'));
- if ($p->has_children()): ?>
- <ul>
- <li class="arrow"></li>
- <?php foreach ($p->children() as $c):
- render($c);
- endforeach; ?>
- </ul>
- <?php endif; ?>
- </li>
- <?php endif;
- endforeach; ?>
- </ul>
- </div><!-- End navigation -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement