title: What is the right place for registerCssFile in Yii?
body: <p>I'm new to Yii.</p>
  
  <p>Is it right to place registerCssFile call inside an action of controller?</p>
  
  <p>My opinion is that right place for this is inside views</p>
  
  <p>E.g I create some chunk of user menu and include it inside <strong>some</strong> of my views. I got separated css file for user menu and I don't want to care about including this <code>user_menu.css</code> inside each action or controller which view uses this user menu. So I use this code inside <code>parts/user_menu.php</code> view:</p>
  
  <pre><code>&lt;?php
      Yii::app()-&gt;getClientScript()-&gt;registerCssFile(yii::app()-&gt;request-&gt;baseUrl.'/css/user_menu.css', 'screen');
  ?&gt;
  &lt;ul class="user-menu"&gt;
  ...here comes menu
  </code></pre>
  
  <p>Is it right or I must include this css file inside of each action or controller instead? </p>
  
  <p>Maybe there are some style guides about this? Any links appreciated...</p>