customize breadcrumbs

edited February 2014 in Modules
I am trying to customize breadcrumbs. Currently using following to generate it:

{fuel_nav(array(render_type='breadcrumb'))}

currently they are generated using ordered list as follows
<ul> <li><a href="home">Home</a> <span class="arrow"> &gt; </span> </li> <li>our services</li> </ul>
I wanted to change it to look as follows
<a href="home">Home</a> &nbsp;/&nbsp; our services

Any ideas on how to get more granular control over this?

Comments

  • edited 7:27PM
    ok following strips off almost everything..
    {fuel_nav(array(render_type='breadcrumb',item_tag='',container_tag='',arrow_class=''))} ///results <a href="home">Home</a> <span class=""> &gt; </span> our services

    Now i need to remove the span as well.
  • edited 7:27PM
    $breadcrumbs = fuel_nav( array( 'render_type' => 'array', 'parent' => '[first bread crumb key]' ) )This will return the array itself starting from the parent key that you choose, from which you could build your own breadcrumbs.

    <ul class="inline"> {loop $breadcrumbs} <li><a href="{$location}"></a></li> <li>&nbsp;/&nbsp;</li> {/loop} </ul>
  • edited 7:27PM
    no no.. without the breadcrumb it renders all the navigation items.
    there must be a way to customize this. I dont mind hardcoding this.
  • edited 7:27PM
    The 'delimiter' parameter can be used to create the " / "
  • edited February 2014
    thanks i was able to update the delimiter but the tags have been hard-coded in Menu.php library.
    TIP: I would suggest removing that and anyone who needs a span can use delimiter parameter to add a span or whatever.

    You may have a better way of doing this but for my own use I have updated Menu.php line# 616 and #634

    //if ($num >= 0) $str .= ' <span class="'.$this->arrow_class.'">'.$this->delimiter.'</span> '; updated to if ($num >= 0) $str .= ' '.$this->delimiter.' ';
    And
    //$str .= ' <span class="'.$this->arrow_class.'">'.$this->delimiter.'</span> '; updated to $str .= ' '.$this->delimiter.' ';
Sign In or Register to comment.