Welcome Guest, Not a member yet? Register   Sign In
How to cache only a part of a view (included views)?
#5

[eluser]term25[/eluser]
[quote author="obiron2" date="1342704000"]I know it's not the question you asked, but if you are always loading the same header and footer, have you thought about having a template file?

in your controller:

Code:
$data['main_content'] = 'the_bit_that_changes_view';
$this->load->view('template_view',$data);

In template_view;
Code:
$this->load->view('header');
$this->load->view($main_content);
$this->load->view('footer');

[/quote]

Yeah, I know, that's what I am doing, I just simplified it a little bit.

I am just curious if e.g. 3 or 4 php functions are a reason to cache and make an html from it or not.


Messages In This Thread
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 02:53 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 04:01 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 04:05 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 06:20 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 06:34 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 07:54 AM
How to cache only a part of a view (included views)? - by El Forum - 07-19-2012, 11:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB