title: Yii CMenu Widget - How to Get Home Page
body: <p>I've put together a menu in Yii (my first project using it) like this:</p>
  <pre><code>$this-&gt;widget('zii.widgets.CMenu',array(
      'items'=&gt;array(
          array('label'=&gt;'Home', 'url'=&gt;array('/')),
          array('label'=&gt;'Examples', 'url'=&gt;array('/examples')),
          array('label'=&gt;'Contact', 'url'=&gt;array('/contact')),
          array('label'=&gt;'FAQ', 'url'=&gt;array('/faq')),
          array('label'=&gt;'Blog', 'url'=&gt;array('/blog')),
          array('label'=&gt;'Order', 'url'=&gt;array('/order')),
      ),
  ));
  </code></pre>
  <p>Each of those URL paths, such as <strong>/examples</strong> is a route defined in my config so that it doesn't look like <strong>site/examples</strong>.</p>
  <p>For the Home link, I'm trying to get it to just link to the root level of the site. Apparently, the CMenu widget passes the URL through <a href="http://www.yiiframework.com/doc/api/1.1/CHtml#normalizeUrl-detail" rel="nofollow noreferrer">CHtml::normalizeUrl()</a> first which ends up making it point at the current page. So if I am on the examples page, the home link points to <strong>/examples</strong>.</p>
  <p>This is what normalizeUrl() says it does:</p>
  <blockquote>
  <p>If the input parameter is an empty string, the currently requested URL will be returned.</p>
  <p>If the input parameter is a non-empty string, it is treated as a valid URL and will be returned without any change.</p>
  <p>If the input parameter is an array, it is treated as a controller route and a list of GET parameters, and the CController::createUrl method will be invoked to create a URL.</p>
  </blockquote>
  <p>I've tried passing an empty string and it ends up pointing to the current request URL as expected. I've tried passing &quot;/&quot; which is a non-empty string and it <em>still</em> points to the current request URL. I've also tried passing it an array and it dies with <code>trim() expects parameter 1 to be string, array given</code> because the CMenu is expecting a string.</p>
  <p>I'm trying to do things the Yii way but I'm seriously about to just leave the menu static if it can't address something as simple as going back to the home page.</p>
  <p><strong>TL;DR</strong> How can I make the CMenu widget in Yii create a link to &quot;/&quot; or to the base domain?</p>