Posted By

ericmuyser on 01/31/11


Tagged

ls breadcrumbs


Versions (?)

ls breadcrumbs


 / Published in: PHP
 

  1. <div class="breadcrumb">
  2. <? $this->render_partial('shop:category_breadcrumb', array('list' =>$product->category_list->as_array(), 'item_delimiter' => '/','show_item_delimiter' => true)) ?>
  3. </div><!-- /.breadcrumb -->
  4.  
  5.  
  6.  
  7. shop:category_breadcrumb =
  8.  
  9.  
  10. <?
  11. 'anchor_default_class' => '',
  12. 'item_default_class' => '',
  13. 'item_current_class' => 'current',
  14. 'item_first_class' => 'first',
  15. 'item_last_class' => 'last',
  16. 'show_item_children' => true,
  17. 'item_delimiter' => '>',
  18. 'show_item_delimiter' => false
  19. ), $params));
  20.  
  21. ?>
  22. >
  23. <? foreach($list as $k => $item): ?>
  24. <?
  25. $is_first = $k == 0;
  26. $is_last = $k == count($list) - 1;
  27. ?>
  28. <a href="<?= $item->page_url('/category') ?>"><?= h($item->name) ?></a><?= !$is_last && $show_item_delimiter ? $item_delimiter : null ?>
  29. <? endforeach ?>

Report this snippet  

You need to login to post a comment.