geniv / nette-breadcrumb
Breadcrumbs component for Nette Framework
Installs: 6 847
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
- geniv/nette-general-form: >=1.0.0
- nette/nette: >=2.4.0
This package is auto-updated.
Last update: 2024-12-14 04:34:19 UTC
README
Installation
$ composer require geniv/nette-breadcrumb
or
"geniv/nette-breadcrumb": ">=1.0.0"
require:
"php": ">=7.0.0", "nette/nette": ">=2.4.0", "geniv/nette-general-form": ">=1.0.0"
Include in application
neon configure:
services: - BreadCrumb
usage:
use BreadCrumb; protected function createComponentBreadCrumb(BreadCrumb $breadCrumb): BreadCrumb { // $breadcrumb->setTemplatePath(__DIR__ . '/templates/BreadCrumb.latte'); // $breadcrumb->addLink('link', ['Homepage:'], 'icon-homepage'); // default breadcrumb return $breadcrumb; }
presenters:
// add link $this['breadCrumb']->addLink('Sub page'); // or $this['breadCrumb']->addLink('Sub page', ['User:']) // link with parameters $this['breadCrumb']->addLink('Sub page', ['User:', 123, 321]) or $this['breadCrumb']->addLink('Sub page', ['User:', 123, 321], 'fa fa-dashboard') direct transalte title $this['breadCrumb']->addTranslateLink('Sub page');
or update
// edit link $this['breadCrumb']->editLink('Sub page', ['User:'], 'fa fa-dashboard') // link with parameters $this['breadCrumb']->editLink('Sub page', ['User:', 123, 321], 'fa fa-dashboard') direct transalte title $this['breadCrumb']->editTranslateLink('Sub page');
or remove
// remove $this['breadCrumb']->removeLink('Sub page');
usage:
{control breadCrumb}