geniv/nette-menu-content

Menu content component for Nette Framework

v1.0.3 2018-07-24 18:35 UTC

This package is auto-updated.

Last update: 2024-12-14 05:04:31 UTC


README

Installation

$ composer require geniv/nette-menu-content

or

"geniv/nette-menu-content": ">=1.0.0"

require:

"php": ">=7.0.0",
"nette/nette": ">=2.4.0",
"dibi/dibi": ">=3.0.0",
"geniv/nette-locale": ">=1.0.0",
"geniv/nette-general-form": ">=1.0.0"

Include in application

neon configure:

services:
    - MenuContent(%tablePrefix%)

usage:

protected function createComponentMenuContent(MenuContent $menuContent): MenuContent
{
    // $menuContent->setTemplatePath(__DIR__ . '/templates/MenuContent.latte');
    // $menuContent->setTemplatePathByIdent('ident1', 'path1');
    // $menuContent->setTemplatePathByIdent('ident2', 'path2');
    // $menuContent->setIdLocale(null);
    return $menuContent;
}

usage:

{control menuContent}
or
{control menuContent 'ident1'}
{control menuContent 'ident2'}