Breadcrumb

Indicate the current page’s location within a navigational hierarchy that automatically adds separators via CSS.

Bootstrap docs: https://getbootstrap.com/docs/5.3/components/breadcrumb/

Breadcrumb

Syntax

$Bootstrap = new renderabootstrap5component();
echo $Bootstrap->breadcrumb($aItems)
Returns: string

Parameters: 1

Parameter #0 [ <required> array $aItems ] 
array of breadcrumb items
  • href {string}
  • label {string}

Example

PHP snippet

$Bootstrap->breadcrumb([
  0 => [
    'href' => '#',
    'label' => 'Home',
  ],
  1 => [
    'href' => '#',
    'label' => 'Library',
  ],
  2 => [
    'href' => '#',
    'label' => 'Data',
  ],
]);

Generated html output

<nav aria-label="breadcrumb">
<ul class="breadcrumb">
<li class="breadcrumb-item">
<a href="#">
Home
</a>
</li>
<li class="breadcrumb-item">
<a href="#">
Library
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Data
</li>
</ul>

</nav>