Updating Content Block Automatically

Permalink
Hello all,

I apologise if this is the wrong place to post, or if it has already been discussed, but I can't find help on it anywhere I've looked.

What I need to accomplish is -
I have a content block on my page layout template (default.php), which is used for various pages (i.e. Home, Rooms, Location etc). This content block displays some up to date info on deals available. What I'd like to do it update one block on the Home page, and have it auto update the same blocks on the Rooms and Location page. Is this possible? If so could you explain how?

I'm not overly familiar with PHP, so be kind!

Thanks guys and gals.

 
Steevb replied on at Permalink Reply
Steevb
cannonf700 replied on at Permalink Best Answer Reply
cannonf700
This is what "Stacks" are for. You create a new stack called "Deals" and then add a block to the stack.

Then add this stack to each of the pages you mentioned. (add a stack by clicking on an editable area and then choose 'add stack' instead of 'add block'.
Then, when you want to update go to Home Page and edit the Content Block. These updates will then be reflected everywhere you put that stack.
Steevb replied on at Permalink Reply
Steevb
Or use a 'Global Area' in your theme:
<div class="global">
      <?php  
         $a = new GlobalArea('Global Area');
         $a->display($c);
         ?>
      </div>
adajad replied on at Permalink Reply
adajad
Adding a global area in your theme creates a global stack automatically, so you can handle the content in that global area from dashboard/stacks.
elementals replied on at Permalink Reply
So glad I stumbled onto this - exactly what I needed! Thx!
JohntheFish replied on at Permalink Reply
JohntheFish
You may find this howto of interest, summing up the various methods available.

http://www.concrete5.org/documentation/how-tos/designers/show-conte...
elementals replied on at Permalink Reply
Thanks JontheFish :D Very helpful!
jonnahealey replied on at Permalink Reply
Thank you very much! Makes a lot of sense. I had to jump into this project without reading a lot through the documentation, so I'm having to guess a lot of things - but your help certainly worked anyway, so thanks!
Steevb replied on at Permalink Reply
Steevb
A 'Global Area' is also lot less work!

Stacks = three clicks

Global = one click