Created
February 7, 2014 12:27
-
-
Save visb/8861778 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <div class="wrapper"> | |
| <section class="breadcrumb"> | |
| <?php echo $breadcrumb; ?> | |
| </section> | |
| <div class="clear"></div> | |
| <section class="sidebar"> | |
| <h3><?php echo $pagina->titulo->valor; ?></h3> | |
| <?php if(count($categorias = $parent->childrens(1,1))){ ?> | |
| <ul> | |
| <?php foreach($categorias as $cat){ ?> | |
| <li<?php echo $cat->id == $categoria->id ? ' class="active" ' : ''; ?>> | |
| <a href="{base_url}produtos/<?php echo $parent->seo_slug; ?>/<?php echo $cat->seo_slug; ?>"> | |
| <?php echo $cat->titulo; ?> | |
| </a> | |
| <?php | |
| error_reporting(E_ALL); | |
| $childrens = $cat->childrens(1,1); | |
| foreach($cat->produtos($cat->id) as $produto) | |
| { | |
| $childrens[] = $produto; | |
| } | |
| if(!count($childrens)) | |
| { | |
| $childrens = null; | |
| } | |
| ?> | |
| <?php if(!is_null($childrens)){ ?> | |
| <ul> | |
| <?php foreach($childrens as $children){ ?> | |
| <li<?php echo isset($children->parent_id) && $children->id == $categoria->id ? ' class="active" ' : ''; ?>> | |
| <a href="{base_url}produtos/<?php echo $parent->seo_slug; ?>/<?php echo $cat->seo_slug; ?>/<?php echo $children->seo_slug; ?>"> | |
| <?php echo $children->titulo; ?> | |
| </a> | |
| </li> | |
| <?php } ?> | |
| </ul> | |
| <?php } ?> | |
| </li> | |
| <?php } ?> | |
| </ul> | |
| <?php } ?> | |
| </section> | |
| <section role="main" class="content-product-categoria"> | |
| <article class="category-introduction"> | |
| <header> | |
| <h1><?php echo $categoria->titulo; ?></h1> | |
| <hr /> | |
| </header> | |
| <content> | |
| <?php echo $categoria->descricao; ?> | |
| <ul class="products-list"> | |
| <?php foreach($produtos as $i => $produto){ ?> | |
| <li class="<?php echo $i%3 == 0 ? ' first ' : ''; ?>"> | |
| <article> | |
| <header> | |
| <a href="<?php echo $produto->produto_url; ?>"> | |
| <h3><?php echo $produto->titulo; ?></h3> | |
| </a> | |
| </header> | |
| <content> | |
| <?php if(isset($produto->imagem->url) && $produto->imagem->exists){ ?> | |
| <img src="<?php echo $produto->imagem->url; ?>" /> | |
| <?php }else{ ?> | |
| <div class="image-error"> | |
| <img src="{base_url}img/main/default-product.jpg" /> | |
| </div> | |
| <?php } ?> | |
| </content> | |
| <footer> | |
| <a href="<?php echo $produto->produto_url; ?>"> | |
| <div class="total_produtos"> | |
| <span>1355</span> | |
| produtos | |
| </div> | |
| <div class="veja_mais"> | |
| VEJA MAIS</a> | |
| </div> | |
| <div class="clear"></div> | |
| </a> | |
| </footer> | |
| </article> | |
| </li> | |
| <?php } ?> | |
| </ul> | |
| <div class="clear"></div> | |
| <?php if($pagination->pages > 1){ ?> | |
| <div class="paginator"> | |
| <ul> | |
| <li class="description first-child">Página <?php echo $pagination->page; ?> de <?php echo $pagination->pages; ?></li> | |
| <?php for($i = 1; $i <= $pagination->pages; $i++){ ?> | |
| <li<?php echo $i == $pagination->page ? ' class="active" ' : ''; ?>> | |
| <a href="{current_url}pagina/<?php echo $i; ?>"><?php echo $i; ?></a> | |
| </li> | |
| <?php } ?> | |
| </ul> | |
| </div> | |
| <?php } ?> | |
| </content> | |
| </article> | |
| </section> | |
| <div class="clear"></div> | |
| </div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment