kollarovic / navigation
Navigation for Nette
Installs: 1 244
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: >= 8.0
- latte/latte: ^3.0
- nette/application: ^3.1
- nette/bootstrap: ^3.2
- nette/robot-loader: ^4.0
- nette/security: ^3.1
- nette/utils: ^4.0
Requires (Dev)
- nette/tester: ^2.5
- phpstan/phpstan-nette: ^1.2
README
composer.json
{ "require":{ "kollarovic/navigation": "dev-master" } }
config.neon
extensions: navigation: Kollarovic\Navigation\DI\Extension navigation: backend: label: Homepage link: Homepage:default items: page: label: Page link: Page:default setting: label: Setting link: Setting:default items: base: label: Base link: Setting:base advanced: label: Advanced link: Setting:advanced items: web: label: Web link: Setting:web mail: label: Mail link: Setting:mail
presenter
use Kollarovic\Navigation\ItemsFactory; use Kollarovic\Navigation\NavigationControl; use Kollarovic\Navigation\SitemapControl; abstract class BasePresenter extends Nette\Application\UI\Presenter { /** @var \Kollarovic\Navigation\ItemsFactory @inject */ public $itemsFactory; protected function createComponentNavigation() { return new NavigationControl($this->itemsFactory->create('backend')); } protected function createComponentSitemap() { return new SitemapControl($this->itemsFactory->create('backend')); } }
template.latte
{control navigation:menu} {control navigation:breadcrumb} {control navigation:panel} {control sitemap}