• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File checking

#3
(07-01-2016, 04:12 AM)PaulD Wrote: It looks fine to me (although I do not like to load views from views), but I would question the need for the file_exists checks, as the loader class does this anyway. You would then only need:

PHP Code:
$this->load->view($this->config->item('config_theme') . '/template/common/header_view');
$this->load->view($this->config->item('config_theme') . '/template/' $page);
$this->load->view($this->config->item('config_theme') . '/template/common/footer_view'); 

Much cleaner!

PS I would put this into a theme library, and call the views from there. The library could then be as complex as you like, coping with theme JS and CSS files for the footers and headers, or more complex theme layouts that require more than a single header and footer. For instance your blog page might need a standard blog_header and blog sidebar, or your login page might need a public_header and public_footer. You could then have a theme config file with different setups for different page styles within a theme.

Thanks for ideas.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
File checking - by wolfgang1983 - 07-01-2016, 02:41 AM
RE: File checking - by PaulD - 07-01-2016, 04:12 AM
RE: File checking - by wolfgang1983 - 07-01-2016, 04:33 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.