PHPackages                             ictsolutions/codeigniter-breadcrumbs - 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. ictsolutions/codeigniter-breadcrumbs

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

ictsolutions/codeigniter-breadcrumbs
====================================

Breadcrumbs for CodeIgniter 4 framework.

v1.0.4(1y ago)322.4k↓30.7%[2 PRs](https://github.com/ict-solutions-dev/codeigniter-breadcrumbs/pulls)MITPHPPHP ^8.1CI passing

Since Oct 6Pushed 5mo agoCompare

[ Source](https://github.com/ict-solutions-dev/codeigniter-breadcrumbs)[ Packagist](https://packagist.org/packages/ictsolutions/codeigniter-breadcrumbs)[ Docs](https://github.com/ict-solutions-dev/codeigniter-breadcrumbs)[ RSS](/packages/ictsolutions-codeigniter-breadcrumbs/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (8)Used By (0)

Codeigniter Breadcrumbs
=======================

[](#codeigniter-breadcrumbs)

The CodeIgniter Breadcrumb Library assists in generating and rendering breadcrumb navigation based on the current URL segments. It is specifically designed to seamlessly integrate with the CodeIgniter framework. This library simplifies the process of creating breadcrumb navigation by automatically tracking the user's navigation path within your application. It dynamically generates the breadcrumb trail based on the current URL segments, making it effortless to implement and maintain.

[![PHP](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)[![CodeIgniter](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)

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

[](#installation)

Installation is done through Composer.

```
composer require ictsolutions/codeigniter-breadcrumbs
```

Configuration
-------------

[](#configuration)

The library's default behavior can be overridden or augmented by its config file. Copy `examples/Breadcrumb.php` to `app/Config/Breadcrumb.php` and follow the instructions in the comments. If no config file is found the library will use its default. In the Breadcrumb class, you can set the following configuration options:

`$isTranslatable`

Specifies whether the breadcrumbs will be translatable or not. If set to `true` then inside the Language folder, create a new file named `Breadcrumb.php`. This will be the language file for your breadcrumbs.

`$includeHome`

Determines whether the home page should be included in the breadcrumb trail. Setting it to `true` includes the home page in the breadcrumbs, enhancing navigation, while setting it to `false` excludes it from the breadcrumb trail.

- Type: `bool`
- Allowed Values: `false`, `true`
- Default: `true`

`$style`

Sets the desired style for the breadcrumb navigation.

- Type: `string`
- Allowed Values: `tabler`, `bootstrap5`
- Default: `tabler`

Helpers
-------

[](#helpers)

This repository contains two helper functions that allow you to use the `Breadcrumb` class more easily in your CodeIgniter project:

- `render_breadcrumb()`: Renders the breadcrumb navigation through the `Breadcrumb` service.
- `replace_breadcrumb_params()`: Replace all numeric text in breadcrumb links, along with a set of configured special words including `create`, `edit`, and `delete`, with new parameters through the `Breadcrumb` service.

Usage
-----

[](#usage)

#### `render_breadcrumb()`

[](#render_breadcrumb)

This function renders the breadcrumb navigation through the `Breadcrumb` service.

Note: If the route contains `log-`, the `log-` segment will be automatically ignored in the breadcrumb, ensuring a cleaner and more user-friendly navigation experience.

To use this function, simply call `render_breadcrumb()` from your **view** where you want the breadcrumb navigation to appear. You can optionally pass a CSS class name to style the container element for the breadcrumb navigation. For example:

```
