Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need Help Load Array Question

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #154000

    Hi I have the new version of codeigniter I would like to load views array example: it is not picking it up in codeigniter. I would like to know what way is correct and what I am doing wrong.

    $this->children = array(
    'common/footer',
    'common/header'
    ); 
    

    Here is what I am would like it to look like I have go if file exist working.

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    class Home extends CI_Controller {
    
    public function index() {
    
    
    
    if (file_exists('views/theme' . 'default/template/common/home.tpl')) {
    $this->load->view('theme'. 'default/template/common/home.tpl');
    }
    else {
    $this->load->view('theme/default/template/common/home.tpl');
    }
    
    $this->children = array(
    'common/footer',
    'common/header'
    ); 
    
    }
    }
    
Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.