Breadcrumb Object 

 Breadcrumb Objects are an easy way to create breadcrumbs. Wonderful Relations has predefined css style for Breadcrumbs. Generally Breadcrumbs are an unordered lists with list-items, optional with links.

Parameters

  • attributes = array()
  • text = string, default = ”

 

Functions:

  • add_crumb ( name, link, active )
  • render_dom

 

Usage

 

$breadcrumb = new BreadcrumbObject();

$breadcrumb->add_crumb( "Home", '/' );
$breadcrumb->add_crumb( "Item 1", '/1/', true );
$breadcrumb->add_crumb( "Item 2", '/2/' );

$breadcrumb->get_template();

Output

 

<ol class="breadcrumb">
  <li class="breadcrumb-item">
    <a href="/">Home</a>
  </li>
  <li class="breadcrumb-item active">
    <a href="/">Item 1</a>
  </li>
  <li class="breadcrumb-item">
    <a href="/">Item 2</a>
  </li>
</ol>
0
    0
    Your Cart
    Your cart is emptyReturn to Shop