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

[eluser]term25[/eluser]
E.g. only the block or banners that are included into the main view like:

Code:
<div id="footer">&lt;?php $this->load->view('footer_view'); ?&gt;</div>

or

Code:
<div id="banner">&lt;?php $this->load->view('banner_view'); ?&gt;</div>

the problem is I do not have controller for them just views, because there is only a static content.

I was thinking that maybe if I make a new instance in footer_view, then I could use something like:

$this->output->cache(n); inside my view file

or is this approach completely wrong and I should do it differently?

What is the proper technique for caching blocks/modules on the page?


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