0
votes

I have designed a template using the template library of codeigniter, the template has the following regions:

$template['template_ar']['template'] = 'template_ar';
$template['template_ar']['regions'] = array(
  'header',
  'title',
  'content',
  'topcontent',
  'sidebar',
  'footer',
  'options',
  'script',
);

I used the following code to render my template

class faq extends MY_Controller {
  /** 
  * Index
  * This function views the Home Page
  * 
  * @access  public
  * @return  
  */

  public function index() {
    $this->template->write_view('content','comment/questions');   
    $this->template->write('options','You one',TRUE);      
    $this->template->render();
  }
}

The problem that I want to eliminate is that I want to prevent the top content from appearing in my template. I need only the content, the header and the footer. Can anyone tell me how to do this?

1
can you share your library code here scrp.at to have look on it. - umefarooq
Which template library are you using? williamsconcepts or phil's or another one? - swatkins

1 Answers

0
votes

Template Library for CodeIgniter

Set regions for writing to

$this->template->set_regions($regions);

Dynamically add region to the currently set template

$this->template->add_regions($name, $props);

Empty a region's content

$this->template->empty_region($name);