Conversation
So far the basic dropdown menu of Twitter Bootstrap is created. Other features to be followed: Tabs, Pills, Stacked Tabs, Stacked Pills, and Nav List. Feel free to make changes to suit your needs.
* | ||
* @var string | ||
*/ | ||
const NS = 'ZfcTwitterBootstrap\View\Helper\Navigation'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like this is used anywhere... is there a purpose to this constant?
Really love the feature man! See if you can sync this with ZF master and I can merge this in! If you have anytime it would be great if you could add this to the readme as well. Otherwise if not I can certainly update that. Excellent work! |
Thanks! Will do my best to sync with ZF master since I tested this on ZF2 RC 4. The code might change because I wanted to try another approach to achieve the code like below. echo $this->navigation('zendnavigation')->nav(); Basically, I am trying to avoid reinventing the wheel. |
Any news on this? |
Nothing yet; just waiting on some updates. Otherwise I am going to attempt to get to this at some point here in the near future. |
Is there any update on this issue? |
I am actually working on navigation component related items this week; also please see a discussion that is going on on zf-contributors: http://zend-framework-community.634137.n4.nabble.com/Zend-View-Helper-Navigation-Issues-Proposed-Changes-td4658767.html |
Closing this since feedback has not been produced. |
So the trail kind of goes cold here, just wondering if there are any updates? I've tried using the code in this PR and it produces a SM error: Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ztbNavigation' UPDATE:
<?php
return array(
'view_helpers' => array(
'invokables' => array(
...,
...,
'ztbNavigation' => 'ZfcTwitterBootstrap\View\Helper\Navigation', //Add this line
),
),
);
echo $this->ztbNavigation('Navigation')->nav(); |
There is a cleaner approach to doing this than the PR had originally done. I have simply not had the time to focus on implementing it at this point but navigation component has a lot of use cases that we need to solve. |
Agreed. I'm not sure I'm well versed enough yet to identify all of the issues and submit a PR, but it may be worth outlining some of those in case someone is itching to get started. I'm sure a lot of people would be interested in the feature. |
Just for the record, this code no longer works. Looks like updates to ZF2 Navigation make it incompatible. |
It is pretty easy to change the code such that it matches the extended class in ZF2.2 |
Thanks Johan! I also realized I never noted in my first post the things that needed to be added to the module's autoload_classmap.php. You can see them in Johan's commit: https://github.com/JapavehWebdesign/ZfcTwitterBootstrap/commit/59df8c628b2d9fb70d681762537456cce77a87b1 'ZfcTwitterBootstrap\View\Helper\Navigation' => __DIR__ . '/src/ZfcTwitterBootstrap/View/Helper/Navigation.php',
'ZfcTwitterBootstrap\View\Helper\Navigation\Nav' => __DIR__ . '/src/ZfcTwitterBootstrap/View/Helper/Navigation/Nav.php',
'ZfcTwitterBootstrap\View\Helper\Navigation\PluginManager' => __DIR__ . '/src/ZfcTwitterBootstrap/View/Helper/Navigation/PluginManager.php', |
Alright folks; sorry for the long delay but I have added this in with some slight changes as well as breadcrumb support. |
Much appreciated, Mike. |
So far the basic dropdown menu of Twitter Bootstrap is created. Other features to be followed: Tabs, Pills, Stacked Tabs, Stacked Pills, and Nav List. Feel free to make changes to suit your needs.
Usage:
For quick and dirty guide on Zend\Navigation see this article: http://adam.lundrigan.ca/2012/07/quick-and-dirty-zf2-zend-navigation/