title: Yii CMenu active item not being set
body: <p>I'm using Yii's CMenu to generate menu in the following way:</p>
  
  <pre><code>$this-&gt;widget('zii.widgets.CMenu', array(
          'items'=&gt;$this-&gt;mainMenu,
          'lastItemCssClass'=&gt;'mitem-last',
          'activeCssClass'=&gt;'mitem-active',
          'activateParents'=&gt;true
  ));
  </code></pre>
  
  <p>I am displaying this menu on page <code>index.php?r=site/home</code> and was expecting the following menu item to have <code>mitem-active</code> class:</p>
  
  <pre><code>[2] =&gt; Array
  (
      [label] =&gt; test
      [url] =&gt; /index.php?r=site/home
  )
  </code></pre>
  
  <p>However the item is rendered as </p>
  
  <pre><code>&lt;li&gt;&lt;a href="/index.php?r=site/home"&gt;test&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>If I'm not mistaken <code>index.php?r=site/home</code> has route <code>site/home</code> (which is also the output of <code>$this-&gt;route</code>), and as a matter of fact the link was created using</p>
  
  <pre><code>$link['url']=$this-&gt;createUrl(current($mitem['url']),$params);
  </code></pre>
  
  <p>where <code>current($mitem['url'])</code> outputs <code>site/home</code> and <code>$params</code> is just <code>array()</code>. </p>
  
  <p>Am I missing something?</p>
  
  <p><strong>EDIT:</strong> <code>$this-&gt;mainMenu</code> is an array made up off multiple <code>$link</code>s built in a loop (from xml).</p>
  
  <pre><code>$this-&gt;mainMenu = array();
  foreach($xml-&gt;mitem as $mitem){
      $link=array();
  
      ... compute some values like $link['label'], $params etc ...
      $link['url']=$this-&gt;createUrl(current($mitem['url']),$params);
      $this-&gt;mainMenu[]=$link;
  }
  </code></pre>