Skip to content

Instantly share code, notes, and snippets.

View gbili's full-sized avatar

gbili gbili

View GitHub Profile
@gbili
gbili / bread
Created April 6, 2013 12:47
bread
<ul class="breadcrumb">
<?php $lastPageKey = count($this->pages) - 1?>
<?php var_dump($this->pages) //blank page?>
<?php foreach ($this->pages as $key => $page): // iterate through the pages?>
<li><?php get_class($pages) //error, expects object array given?></li>
<li>
<?php if ($key < $lastPageKey): // if this isn't the last page, add a link and the separator?>
<a href="<?= $page->getHref() ?>"><?= $page->getLabel() ?></a>
<span class="divider">/</span>
<?php else: // otherwise, just output the name ?>
@gbili
gbili / nav output
Created April 4, 2013 08:36
html in browser
<li class="active">
<a href="/engine">Engine</a>
<ul>
<li>
<a href="/engine/install">Install</a>
</li>
<li>
<a href="/engine/uninstall">Uninstall</a>
</li>
@gbili
gbili / nav
Created April 4, 2013 08:31
top nav
<a class="brand" href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Miner Application') ?></a>
<div class="nav-collapse collapse">
<?php echo $this->navigation('Navigation')
->menu()
->setMinDepth(0)
->setMaxDepth(1)
->setUlClass('nav')
->render() ?>
<?php /*<ul class="nav">
<li class="active"><a href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Home') ?></a></li>