| 
 
How do I load modules in a cached page

Well, PageCache 2.0 ships with a module installed (load_modules) to do that for you. There are two steps to reload modules. The first, is to publish the load_modules module (from the pagecache config). The next step is described below:

Edit your template file... Find the line that loads the module position that you want loaded (looks like )... Now RIGHT around it (just outside of the brackets, add the following lines. IT IS IMPORTANT THAT THEY LOOK EXACTLY LIKE THIS. You can change 'left' and '2', but leave everything else exactly the way it is, or it won't work...

Before (NOTE, change left to the position you want, and the number is the style.

 
<!--CacheLoadModule-left:2:-->

After (This MUST BE EXACT)

 
<!--EndLoadModule-->

That's it!!! Now all you need to do is save the template, and clear the cache. Those modules should be automatically refreshed (with very little performance loss).

Here's an example... Prior to being modified (what to look for)

 
<?php mosLoadModule('right', -3); ?>

After Modification

 
<!--CacheLoadModule-right:-3:-->
<?php mosLoadModules('right', -3); ?>
<!--EndLoadModule-->
Tags
33,33% of 9 voters found this FAQ useful,  I found this FAQ  useful useful  not useful not useful
< Prev   Next >
feed image
Copyright 2007 Anthony Ferrara, All Rights Reserved