PHPackages                             jinnguyen/puja-breadcrumb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jinnguyen/puja-breadcrumb

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jinnguyen/puja-breadcrumb
=========================

Puja-Breadcrumb is a simple class to manage the breadcrumbs

v1.0.0(9y ago)039Apache License 2.0PHP

Since Jan 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jinnguyen/puja-breadcrumb)[ Packagist](https://packagist.org/packages/jinnguyen/puja-breadcrumb)[ RSS](/packages/jinnguyen-puja-breadcrumb/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

puja-breadcrumb
===============

[](#puja-breadcrumb)

Puja-Breadcrumb is a simple class to manage the breadcrumbs

Installation
------------

[](#installation)

Just run this on the command line:

```
composer require jinnguyen/puja-breadcrumb

```

Usage
-----

[](#usage)

```
include '/path/to/vendor/autoload.php';
use Puja\Breadcrumb\Breadcrumb;
```

Examples:
---------

[](#examples)

**Simple**

```
$breadcrumb = new Breadcrumb;
$breadcrumb->add('Subpage 2', '/subpage2');
echo $breadcrumb->render();
```

**new breadcrumb with a array**

```
$breadcrumb = new Breadcrumb(array(
    array('title' => 'Home', 'link' => '/'),
    array('title' => 'Page', 'link' => '/page'),
    array('title' => 'Subpage', 'link' => '/subpage/?a=5&b[]=7&b[]=8'),
));
$breadcrumb->add('Subpage 2', '/subpage2');
echo $breadcrumb->render();
```

The rest of the documentation will assume you have a `$breadcrumb` instance on which you are making calls.

### Adding a crumb

[](#adding-a-crumb)

```
$breadcrumb->add('Home', '/');
```

### Delete all crumb

[](#delete-all-crumb)

```
$breadcrumb->deleteAll();
```

### Delete last crumb

[](#delete-last-crumb)

```
$breadcrumb->deleteLastItem();
```

### Count breadcrumb elements

[](#count-breadcrumb-elements)

```
$breadcrumb->count();
```

### Check empty

[](#check-empty)

```
$breadcrumb->isEmpty(); // same with $breadcrumb->count() == 0
```

### Get data:

[](#get-data)

```
$breadcrumb->getData(); // get all breadcrumb nodes
```

### First and Last CSS classes

[](#first-and-last-css-classes)

```

```

- [Home](/)
 // First Breadcrumb element - [Page](/page)
- [Subpage](/subpage/?a=5&b[]=7&b[]=8)
- Subpage 2
 // Last Breadcrumb Element
The first/last css classes are the class of first/last Breadcrumb element

```
$breadcrumb->setFirstCssClassName($className);
$breadcrumb->setLastCssClassName($className);
```

### The Element

[](#the-element)

The default breadcrumb element is `%s{Divider}`. To change it, use the setElement method like so:

```
$breadcrumb->setElement('%s{Divider}');
```

**Note:**

```
"%s" is required for Breadcrumb::$element
{FirstLastCss}: will be replaced by Breadcrumb::$firstCssClassName for first element and Breadcrumb::$lastCssClassName for last element
{Divider}: will be replaced by Breadcrumb::$divider
```

### The List Element

[](#the-list-element)

The default list element used to wrap the breadcrumbs, is `%s`. To change it, use the setListElement method like so:

```
$breadcrumbs->setListElement('%s');
```

**Note:**

```
"%s" is required for Breadcrumb::$listElement
```

### Divider

[](#divider)

The default breadcrumb divider is `` (empty). This will be replace to placeholder {Divider} in property Breadcrumb::$element. If you'd like to change it to, for example, `/`, you can just do:

```
$breadcrumb->setDivider('/');
```

### Output

[](#output)

Finally, when you actually want to display your breadcrumbs, all you need to do is call the `render()` method on the instance:

```
echo $breadcrumb->render();
```

Note that by default crumb titles are rendered with escaping HTML characters, if you'd like to ignore it just do like so:

```
$breadcrumb->setSafeHtml(false);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25e5bd31b5dd70d47cbdc738bded06dbabfba3d584acce63c2c4b4fb7847f39d?d=identicon)[jinnguyen](/maintainers/jinnguyen)

---

Top Contributors

[![linhnmt](https://avatars.githubusercontent.com/u/10231628?v=4)](https://github.com/linhnmt "linhnmt (1 commits)")[![linhnnmt](https://avatars.githubusercontent.com/u/162856460?v=4)](https://github.com/linhnnmt "linhnnmt (1 commits)")

---

Tags

breadcrumbpuja

### Embed Badge

![Health badge](/badges/jinnguyen-puja-breadcrumb/health.svg)

```
[![Health](https://phpackages.com/badges/jinnguyen-puja-breadcrumb/health.svg)](https://phpackages.com/packages/jinnguyen-puja-breadcrumb)
```

###  Alternatives

[log1x/crumb

A simple WordPress breadcrumb for Sage 10.

4373.7k](/packages/log1x-crumb)[fragkp/laravel-route-breadcrumb

7011.7k](/packages/fragkp-laravel-route-breadcrumb)[slope-it/breadcrumb-bundle

A bundle for generating dynamic breadcrumbs in Symfony applications

1865.5k](/packages/slope-it-breadcrumb-bundle)[naucon/breadcrumbs

The breadcrumb package helps to integrate a common breadcrumb navigation into a web application. The package includes two components: A breadcrumbs class to add breadcrumb elements and a breadcrumbs helper to render html markup in php or smarty templates.

1225.4k](/packages/naucon-breadcrumbs)[james.xue/laravel-admin-breadcrumb

Breadcrumb Sinicization

171.7k](/packages/jamesxue-laravel-admin-breadcrumb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
