-
Notifications
You must be signed in to change notification settings - Fork 77
Added a function to create nav's for navbar's #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There were once a specific helper to generate navbar (see https://github.com/Holt59/cakephp-bootstrap3-helpers/blob/master/View/Helper/BootstrapNavbarHelper.php) with lots of feature and working a bit like the I think navbar are a big deal but having everything in one function doesn't seem right for me, so I will try to upgrade the |
|
:O Sorry, I never saw it. Maybe the code can be reused, because it doesn't
|
|
I just pushed a commit with a new echo $this->Navbar->create('Mikael Capelle', array('fixed' => 'top', 'responsive' => 'false', 'inverse' => true)) ;
echo $this->Navbar->beginMenu () ;
echo $this->Navbar->link('Link', '/', ['class' => 'active']) ;
echo $this->Navbar->link('Blog', array('controller' => 'pages', 'action' => 'test')) ;
echo $this->Navbar->beginMenu ('Dropdown') ;
echo $this->Navbar->link ('Action');
echo $this->Navbar->link ('Another action') ;
echo $this->Navbar->link ('Something else here') ;
echo $this->Navbar->divider () ;
echo $this->Navbar->link ('Another action') ;
echo $this->Navbar->divider () ;
echo $this->Navbar->link ('Another action') ;
echo $this->Navbar->endMenu () ;
echo $this->Navbar->endMenu () ;
echo $this->Navbar->searchForm () ;
echo $this->Navbar->text('Signed in as <a href="#" class="classtest">Holt59</a>, <a href="#">Log Out</a>');
echo $this->Navbar->link('Profile');
echo $this->Navbar->end() ; You can have a menu with submenu (the subsubmenus are not working yet), there are some custom stuff like the following ones:
I will work on some feature to automatically add « active » class on menu when I have time. |
|
Cool! Thanks!! Also I don't think the auto "active" class is necesary, I think that belongs to the user (?) |
|
Thanks for the typo, it's corrected. Concerning the |

For example the following code
Will produce the next result

allowing to add atributes to the li item, the link and the dropdown.
Maybe it need's some testing and some code review. Tried to be as clean as posible