PHP code example of cihispano / breadcrumbs

1. Go to this page and download the library: Download cihispano/breadcrumbs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cihispano / breadcrumbs example snippets


$breadcrumbs = new Breadcrumbs();
$breadcrumbs->addBreadcrumb('Admin','https://localhost/admin');
$breadcrumbs->addBreadcrumb('Users','https://localhost/admin/users');
$breadcrumbs->addBreadcrumb('Roles','https://localhost/admin/users/roles');
$html = $breadcrumbs->render();

$navTag = '<nav class="test" aria-label="breadcrumb">';
$olTag = '<ol class="breadcrumb" type="1">';
$liTag = '<li class="breadcrumb-item" value="2">';
$separator = '-';

$config = new BreadcrumbConfig(
    !BreadcrumbConfig::DEFAULT_GENERATE_LINKS,
    $separator,
    $navTag,
    $olTag,
    $liTag
);