title: Steps to create a widget on Yii?
body: <p>I have the following code on a given view:</p>
  
  <pre><code>&lt;?php
      $form = $this-&gt;beginWidget('CActiveForm', array(
          'id' =&gt; 'home-newsletter-form',
          'enableAjaxValidation' =&gt; false,
          'enableClientValidation' =&gt; true,
              ));
  
      echo $form-&gt;textField($newsletterSubscribeForm, 'email');
      echo $form-&gt;error($newsletterSubscribeForm, 'email');
      echo CHtml::link("subscribe", "#", array('class'=&gt;'btSubscribe'));
      $this-&gt;endWidget(); 
  ?&gt;
  </code></pre>
  
  <p>It happens that I will need this on MORE then one view, so I find a widget a better option.
  I wish however to place this on a separate file (on app/widgets/ folder), and called on each view.</p>
  
  <p>Can anyone please be kind enough to tell me what steps should we follow in order to achieve that?</p>