how to make custom breadcrumb

edited May 2015 in Modules
Hi im trying to make a custom breadcrumb for a product catalog but i couldn't make it can somebody give me an example how to make it?

thanks in advance....

Comments

  • edited 10:13PM
    by the way all the breadcrumb build process should be in the controller
  • edited 10:13PM
    The most basic example is the following:
    echo fuel_nav(array('render_type' => 'breadcrumb'));
    http://docs.getfuelcms.com/general/navigation

    If you are dynamically building the menu then you'll need probably need to pull in the products and categories which can be done on particular layout pages or in the views/_variables/nav.php file. You can add the following to that file:
    $products = fuel_model('products'); foreach($products as $product) { $nav['products/'.$product->slug] = array('label' => $product->name, 'parent_id' => 'products'); }
    Or you can use the "append" parameter:
    foreach($products as $product) { $append['products/'.$product->slug] = array('label' => $product->name, 'parent_id' => 'products'); } echo fuel_nav(array('render_type' => 'breadcrumb', 'append' => $append));
Sign In or Register to comment.