Updating Blocks

edited August 2011 in Modules
Hi,

Just want to clarify something re. best practice for loading in blocks.

Say I have a layout as following:

<?php echo fuel_block('header')?>

<?php echo fuel_var('body', ''); ?>

<?php echo fuel_block('footer')?>

I want to keep the footer block static. When I alter the footer block, if I am logged in and view my page from admin, I can see the change straight away. When I log out and view the page normally, the change is not picked up. I have to go back into admin and resave the page with the layout that loads the block to be able to view the footer block changes.

I get a feeeling I'm doing something wrong here. I understand that using fuel_block will check the database first and if finds nothing, will load in the static view file. So how come it isn't picking up the changes I make when I make them?

Comments

  • edited 3:36PM
    Your footer block is a static view file correct? If so, you will need to clear the cache under the Page Cache menu option on the left (or turn off the page caching option in the fuel configuration). The reason is because the page is cached and it will clear the cache upon save.
  • edited 3:36PM
    Stright forward enough, done the trick. Cheers.
Sign In or Register to comment.