/**
  * Shows either the 'Sent' or 'Drafts' folder using the NewsletterList template
  * Didn't see anywhere it is called from top level ajax call or from templete,
  * it is only called internally from showdrafts and showsent.
  */
 public function ShowNewsletterFolder($params, $type)
 {
     $id = $params['ID'];
     if (!is_numeric($id)) {
         $id = Session::get('currentPage');
     }
     if (is_a($id, 'NewsletterType')) {
         $mailType = $id;
         $id = $mailType->ID;
     } else {
         if ($id && is_numeric($id)) {
             $mailType = DataObject::get_by_id('NewsletterType', $id);
         }
     }
     $draftList = new NewsletterList($type, $mailType, $type);
     return $draftList->renderWith("NewsletterList");
 }