Commits

Christoffer Niska committed 4e201f2

Fixes some minor issues with BootMenu.

Comments (0)

Files changed (1)

widgets/BootMenu.php

 	 */
 	protected function renderItem($item)
 	{
-		if (!isset($item['url']))
-			$item['url'] = '#';
-
 		if (isset($item['items']))
 		{
+			if (!isset($item['url']))
+				$item['url'] = '#';
+
 			if (isset($item['linkOptions']['class']))
 				$item['linkOptions']['class'] .= ' dropdown-toggle';
 			else
 			$item['linkOptions']['data-toggle'] = 'dropdown';
 		}
 
-		return CHtml::link($item['label'], $item['url'], isset($item['linkOptions']) ? $item['linkOptions'] : array());
+		if (isset($item['url']))
+			return CHtml::link($item['label'], $item['url'], isset($item['linkOptions']) ? $item['linkOptions'] : array());
+		else
+			return $item['label'];
 	}
 
 	/**