|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
riwakawd Smarty n00b
Joined: 10 Apr 2014 Posts: 2
|
Posted: Thu Apr 10, 2014 2:00 am Post subject: Create Custom Setup |
|
|
Hello I am wanting to create a themes folder in my views similar to opencart structure but for codeigniter
here is how open cart does the header, footer etc
Code: | if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
return $this->load->view($this->config->get('config_template') . '/template/common/header.tpl', $data);
} else {
return $this->load->view('default/template/common/header.tpl', $data);
} |
On the home controller is
Code: | if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/home.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/common/home.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/common/home.tpl', $data));
} |
How do I get the same affect for that but using smarty and codeigniter? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|