Closed vanya25070 closed 10 years ago
this is working with higliting of current active nav item? current code not working if $item['url'] is not set
so i solved it this way: in TbNav.php
protected function isItemActive($item, $route) {
if(isset($item['url'])){ $itemRoute = trim($item['url'][0], '/'); // Prepend the current module to the item route if it is not present if (Yii::app()->controller->module !== null && substr_count($itemRoute, '/') === 1) { $moduleId = Yii::app()->controller->module->id; $itemRoute = implode('/', array($moduleId, $itemRoute)); } if ( is_array($item['url']) && !strcasecmp($itemRoute, $route)) { unset($item['url']['#']); if (count($item['url']) > 1) { foreach (array_splice($item['url'], 1) as $name => $value) { if (!isset($_GET[$name]) || $_GET[$name] != $value) { return false; } } } return true; } } return false; }
sorry this is yiistrap bug
this is working with higliting of current active nav item? current code not working if
$item['url'] is not set
so i solved it this way: in TbNav.php
protected function isItemActive($item, $route) {