Closed lucas-net-pl closed 9 years ago
Hello Thanks but Please can you give us a link showing a demo of this and what exactly does it do or does it add to the AdminLte ?
I no have demo. I begin working with Yii and make it in free time (what is mean free time? :D ) If i finish, then i;ll publicate demo, but it may take lonk tiem.
This class Help to generate left side main adminLTE menu - like Nav::widget, but support speciach adminLTE classe (by defautl) icons, and badge, thent can be defined in array passing to widget .. like in sampe left.php file attached. With this Class You dont heed to "manualy" wride this menu
Hello, This is a very nice contribution. However, I don't think this is the appropriate place to post this. To reach a wider audience, you might want to post this in the Yii forums or a blog post such as this http://www.yiiframework.com/wiki/729/tutorial-about-how-to-integrate-yii2-with-fantastic-theme-adminlte/
Nonetheless, thank you for the contribution and good luck!
hello, tell me pls how i can add class active to item and parent item in current page? http://c2n.me/3cghUgd
i add your code in left.php and edit urls [ 'label' => 'Content', 'url' => $directoryAsset.'/#', 'ico' => 'bar-chart-o', 'items' => [ ['label' => 'Products', 'url' => Url::toRoute('products/index')], ['label' => 'Category', 'url' => Url::toRoute('category/index')], ['label' => 'Cities', 'url' => Url::toRoute('citys/index')], ], ],
then after click for example on Products. Menu item hasn`t class active.
W dniu 11.02.2015 o 16:52, Valeriy pisze:
hello, tell me pls how i can add class active to item and parent item in current page? http://c2n.me/3cghUgd
— Reply to this email directly or view it on GitHub https://github.com/almasaeed2010/AdminLTE/issues/190#issuecomment-73904518.
Hello
Thist is done by function: protected function isItemActive($item) of NavLTE class, thent is similar to same function in Nav class.
So thist class will automaticly set active. Ele You cent overwrite this funcjion.
pozdrawiam
Łukasz A. Grabowski ul. Jana Czerskiego 12
PGP key ID: 27160538 ldap://keyserver.pgp.com http://lucas.net.pl/pgp/lucas.asc
but why its not worked ? if i copying your code and changed urls ? use backend\components\NavLTE;
I cant replay it Yet. Fo mi it working fine, i must try to debug it and find solutions. By i cen't do it erlier in end of next weak. Sory.
But i'l try to do it
W dniu 11.02.2015 o 18:17, Valeriy pisze:
but why its not worked ? if i copying your code and changed urls ? use backend\components\NavLTE;
<?= NavLTE::widget( [ 'items' => [ [ 'label' => 'Menu AdminLTE', 'url' => '#', 'ico' => 'angle-down', 'textClass'=> ['text-info'] ], ['label' => 'Dashboard', 'url' => $directoryAsset.'/index.html', 'ico' => 'dashboard' ], ['label' => 'Widgets', 'url' => $directoryAsset.'/pages/widgets.html', 'ico' => 'th', 'badge' => [ 'text' => 'new', 'color' => 'green', 'ico' => 'check' ] ], [ 'label' => 'Content', 'url' => $directoryAsset.'/#', 'ico' => 'bar-chart-o', 'items' => [ ['label' => 'Products', 'url' => Url::toRoute('products/index')], ['label' => 'Category', 'url' => Url::toRoute('category/index')], ['label' => 'Cities', 'url' => Url::toRoute('cities/index')], ], ], ......................other items
— Reply to this email directly or view it on GitHub https://github.com/almasaeed2010/AdminLTE/issues/190#issuecomment-73921892.
pozdrawiam
Łukasz A. Grabowski ul. Jana Czerskiego 12 44-105 Gliwice tel.: +48 604 466601 E-Mail: lucas@lucas.net.pl www.lucas.net.pl
PGP key ID: 27160538 ldap://keyserver.pgp.com http://lucas.net.pl/pgp/lucas.asc
ty, i try to find what i doing wrong by my self. But if i can`t i will be visit this page again :))
Hi, thanks for this!
hello, tell me pls how i can add class active to item and parent item in current page?
If someone still need this the solution is to add $this->activateParents = true;
at the beginning of the function init()
Hello I;m new in Yii, so i can't itegrate my solutios, by i thihk thet it will be usefull for others im write sam Nav widget for render adminLTE sidebar easly
here a code:
If You think, ith usable for others, pleas integrate it.
Here are example of usage in left.php: