title: Yii app()->createUrl for view action
body: <p>I use generated actions by Gii in a module said News. I have normal view action that works with an id parameter (such as <code>example.com/news/view/id/1</code>).<br>
  When I use this line of code:</p>
  
  <pre><code>Yii::app()-&gt;createUrl("news/view",array("id"=&gt;$data-&gt;primaryKey))
  </code></pre>
  
  <p>It generates <code>example.com/news/1</code> (if <code>$data-&gt;primaryKey</code> is 1). It is not correct.<br>
  When I use this line of code:</p>
  
  <pre><code>Yii::app()-&gt;createUrl("news/view/id/",array("id"=&gt;$data-&gt;primaryKey))
  </code></pre>
  
  <p>It generates <code>example.com/news/id/id/1</code> (if <code>$data-&gt;primaryKey</code> is 1).</p>
  
  <p>I am so confused! in first situation, this function doesn't generate id as a parameter name, and in second situation, it does! but after manually added id.<br>
  What shoud I do to make correct url format with this function?</p>
  
  <p><strong>Edit:</strong> news is a module. I changed the line of code as:</p>
  
  <pre><code>Yii::app()-&gt;createUrl("news/default/view/id/",array("id"=&gt;$data-&gt;primaryKey))
  </code></pre>
  
  <p>It generates <code>example.com/news/default/view/id/1</code> that is correct, but I don't want that default!</p>