Hello,
i try to create a kind of templateset,
in my controller i call the
mainpage like this
"
$data['view_page']= $page; //here is the main-content-filename for example "login" (.php)
$data['view_data']= $dataP; //Some data
echo view('templates/v1/create_page', $data);
"
in the "
create_page" i include a lot of single files to seperate the different parts like this
"
$data['data']=$view_data; //pass some data from controller to subfiles !?
$this->include($view_page,$data); //here i include my main-content-file for example "login"
//from this mainfile i need access to the $data vars in the following files, but all my tries failed. Is it possible? How?
$this->include('templates/v1/head',$data);
$this->include('templates/v1/header',$data);
$this->include('templates/v1/sidebar_left',$data);
"
main-content-file for example "
login"
"
//The following $data i need in the mainpage AND also included files like head, header etc. (as shown on top)
$data['view_template']=array( 'val1' => 'default', 'val2'=>''...);
$this->section('title') ?>Some content here <?= $this->endSection() ?>
"
Hope i could explain what i want to do?