title: New Page For OpenCart
body: <p>I am trying to create a whole new page for OpenCart for a News section, and I was pretty sure I created all the right files, the page renders but it is blank in the middle (Renders the header and footer fine). What did I miss?!?</p>
  
  <p>Link To Hit Page: <code>index.php?route=common/news&amp;news_id=A_NUMBER</code></p>
  
  <p>Table Dump:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `news` (
    `id` int(255) NOT NULL AUTO_INCREMENT,
    `user_id` int(255) NOT NULL,
    `title` varchar(255) NOT NULL,
    `body` longtext NOT NULL,
    `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `views` int(255) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
  </code></pre>
  
  <p>Language (news.php):</p>
  
  <pre><code>&lt;?php
  // Text
  $_['heading_title'] = '%s';
  ?&gt;
  </code></pre>
  
  <p>Controller (news.php):</p>
  
  <pre><code>&lt;?php  
  class ControllerCommonNews extends Controller {
      private $error = array();
  
      public function index() {
          $this-&gt;language-&gt;load('common/news');
  
          $this-&gt;data['heading_title'] = $this-&gt;language-&gt;get('heading_title');
  
          $this-&gt;data['breadcrumbs'] = array();
  
          $this-&gt;data['breadcrumbs'][] = array(
              'text'      =&gt; $this-&gt;language-&gt;get('text_home'),
              'href'      =&gt; $this-&gt;url-&gt;link('common/home'),         
              'separator' =&gt; false
          );
  
          $news_id = $_REQUEST['news_id'];
  
          $this-&gt;load-&gt;model('common/news');
  
                  $news_info = $this-&gt;model_common_news-&gt;getNews($news_id);
  
                  if ($news_info) {
                      $this-&gt;data['breadcrumbs'][] = array(
                          'title'      =&gt; $news_info['title'],
                          'body'       =&gt; $news_info['body']
                      );
                  }
  
          if (file_exists(DIR_TEMPLATE . $this-&gt;config-&gt;get('config_template') . '/template/common/news.tpl')) {
              $this-&gt;template = $this-&gt;config-&gt;get('config_template') . '/template/common/news.tpl';
          } else {
              $this-&gt;template = 'default/template/common/news.tpl';
          }    
  
          $this-&gt;children = array(
              'common/column_left',
              'common/column_right',
              'common/content_top',
              'common/content_bottom',
              'common/footer',
              'common/header'
          );
  
              $this-&gt;response-&gt;setOutput($this-&gt;render());
          }
      }
  ?&gt;
  </code></pre>
  
  <p>Model (news.php):</p>
  
  <pre><code>&lt;?php
  class ModelCommonNews extends Model {
  
      public function getNews($news_id) {
          $query = $this-&gt;db-&gt;query("SELECT DISTINCT * FROM " . DB_PREFIX . "news WHERE id = '" . (int)$news_id . "'");
  
          return $query-&gt;row;
      }
  
  }
  ?&gt;
  </code></pre>
  
  <p>View (news.tpl):</p>
  
  <pre><code>&lt;?php echo $header; ?&gt;&lt;?php echo $column_left; ?&gt;&lt;?php echo $column_right; ?&gt;
  &lt;div id="content"&gt;&lt;?php echo $content_top; ?&gt;
  &lt;h1 style="display: none;"&gt;&lt;?php echo $heading_title; ?&gt;&lt;/h1&gt;
  &lt;?php echo $content_bottom; ?&gt;
  &lt;/div&gt;
  &lt;?php echo $footer; ?&gt;
  </code></pre>
  
  <p>If more info is needed ask away!!! Any help is greatly appreciated.</p>