zend-navigation

zf3 zend navigation helper

一曲冷凌霜 提交于 2021-01-27 12:50:19
问题 I'm trying to implement my zend navigation from a container in ZF3. I have successfully created navigation with this quick start tutorial introducing navigation directly in config/autoload/global.php or config/module.config.php files: https://docs.zendframework.com/zend-navigation/quick-start/ But now I need to make it work these with the helpers to allow navigation modifications from the controller, using the "Navigation setup used in examples" section: https://docs.zendframework.com/zend

ServiceNotCreatedException in Zend Framework 2 while attempting multiple navigations

半腔热情 提交于 2020-01-05 05:59:34
问题 I am attempting to create multiple navigation menus to use in my application based on a specific user role. The majority of the code is similar to zfc-admin. When I use zfc-admin in my application I am able to bring up an admin menu, however I will have about four roles, and decided to put this in my Application module. module.config.php 'navigation' => array( 'admin' => array( array( 'label' => 'Admin Home', 'route' => 'adminhome', ), ), 'default' => array( array( 'label' => 'Home', 'route'

How do I add a class name to <li> from Zend Navigation XML

∥☆過路亽.° 提交于 2020-01-02 08:38:39
问题 Can someone please help me out, I'm totally stuck! I don't know how to add a class name to <li> tag in Zend navigation XML This is my XML <configdata> <nav> <home> <label>Home </label> <uri>/</uri> </home> <request> <label>Quotes </label> <uri>/quote</uri> </request> <work> <label>How It Works</label> <uri>/how-it-works</uri> </work> <information> <label>Informations </label> <uri>/informations</uri> </information> <directory> <class> last </class> <label>Directory </label> <uri>/directory<

In Zend Framework 2 navigation how can I render HTML content in label?

╄→尐↘猪︶ㄣ 提交于 2019-12-25 08:48:30
问题 Zend navigation escapes my label content. Here is my code; // config 'navigation' => array( 'default' => array( array( 'label' => 'Home', 'route' => 'home', ), array( 'label' => '<i class="fa fa-database"></i> Assets', 'route' => 'assets', 'pages' => array( array( 'label' => 'Browse', 'route' => 'assets/default', 'controller' => 'index', 'action' => 'index', ), array( 'label' => 'Detail', 'route' => 'assets/default', 'controller' => 'index', 'action' => 'host', ), ), ), ), ), // in view

Zend_Navigation with hidden pages

谁说我不能喝 提交于 2019-12-24 10:28:24
问题 I have my Zend_Navigation loaded from a PHP array (but that's irrelevant...) and I'm using the navigation menu helper to generate a menu based on the loaded navigation. Some menu items must not appear in the outputted menu, so I simply set "'visible' => false" in my array for that page and there you go! But if the URL of an 'hidden' menu is accessed, the findActive($container) view helper method returns an empty array, thus the page from the container is not returned, even if it should (like

Zend Navigation Custom Rendering

吃可爱长大的小学妹 提交于 2019-12-23 18:50:37
问题 I'm trying to create a custom navigation for zend navigation but i have two questions: How do i pass variables to custom partial phtml, or if it's possible? How do i set a class trough the whole active menu tree? This is my code so far: in the controller: $config = new Zend_Config($menu); $nav = new Zend_Navigation(); $nav->addPages($config); $this->view->nav = $nav; in the view: <?php echo $this->navigation($this->nav)->menu()->setPartial('menu.phtml')->render(); ?> and my partial: <?php

Add Zend_Navigation to the View with old legacy bootstrap

这一生的挚爱 提交于 2019-12-13 02:37:06
问题 I've been struggling with Zend_Navigation all weekend, and now I have another problem, which I believe has been the cause of a lot of my issues. I am trying to add Zend_Navigation to a legacy 1.7.6 Zend Framework application, i've updated the Zend Library to 1.9.0 and updated the bootstrap to allow this library update. The problem is that I don't know how, and the examples show the new bootstrap method of how to add the Navigation object to the view, I've tried this: //initialise the

Could not create navigation based on Zend_Acl

本秂侑毒 提交于 2019-12-11 18:22:35
问题 I am trying to learn to create navigation with Zend_Acl. But the navigation only displays for admin and no one else. I have read through my code and I tried to trace the code that comes with ZendFramework. But I am stuck and I can't figure out what I am doing wrong. Here is my acl class: class Application_Model_LibraryACL extends Zend_Acl { public function __construct() { $this->add(new Zend_Acl_Resource( 'guestbook' ) ); $this->add( new Zend_Acl_Resource( 'index' ) ); $this->add(new Zend_Acl

Zend Framework double class menu active

元气小坏坏 提交于 2019-12-11 08:18:43
问题 I make a menu with Zend_Navigation. The trouble is that I detect a few times "active menu" that is, the "li" of the current page. Here is my navigation.xml <?xml version="1.0" encoding="UTF-8"?> <configdata> <nav> <home> <label>Accueil</label> <controller>index</controller> </home> <search> <label>Riads</label> <controller>search</controller> <action>index</action> <params> <q>allriads</q> </params> </search> <last> <label>Dernières Minutes</label> <uri>#</uri> </last> <promotion> <label

ZF2: How to get Zend\Navigation inside custom route?

廉价感情. 提交于 2019-12-11 01:41:32
问题 I have custom router and I have to get access to Zend\Navigation inside this custom router. I was googling, asking and searching and no results :/ All I need is to find nodes with 'link' param using Zend\Navigation in my Alias::match function. Here is my module.config.php: 'navigation' => array( 'default' => array( 'account' => array( 'label' => 'Account', 'route' => 'node', 'pages' => array( 'home' => array( 'label' => 'Dashboard', 'route' => 'node', 'params' => array( 'id' => '1', 'link' =>