title: yii custom error pages like 404, 403, 500
body: <p>I'm trying to have separate files for all my error messages. (404, 403, 500 etc) so i can have custom designs for them. If possible i don't want the header and footer to be included in my error pages too. Right now i have this, in my <strong>SiteController.php</strong> and put <strong>error404.php</strong> into my <strong>views/site/</strong> folder</p>
  
  <pre><code>public function actionError()
          {
                  $error = Yii::app()-&gt;errorHandler-&gt;error;
                  switch($error['code'])
                  {
                          case 404:
  
                                  $this-&gt;render('error404', array('error' =&gt; $error));
                                  break;
                          .......
                          .......
                  }
          }
  </code></pre>
  
  <p>i was wondering if there is a better way? or if Yii has way to handle this that i'm missing.</p>
  
  <p>i read this page <a href="http://www.yiiframework.com/doc/guide/1.1/en/topics.error" rel="nofollow">http://www.yiiframework.com/doc/guide/1.1/en/topics.error</a></p>
  
  <p>and it says something about putting files into <code>/protected/views/system</code> but i don't quite understand Yii's documentation.</p>