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.
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.
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.
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.
Or use a 'Global Area' in your theme:
<div class="global"> <?php $a = new GlobalArea('Global Area'); $a->display($c); ?> </div>
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.
So glad I stumbled onto this - exactly what I needed! Thx!
You may find this howto of interest, summing up the various methods available.
http://www.concrete5.org/documentation/how-tos/designers/show-conte...
http://www.concrete5.org/documentation/how-tos/designers/show-conte...
Thanks JontheFish :D Very helpful!
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!
A 'Global Area' is also lot less work!
Stacks = three clicks
Global = one click
Stacks = three clicks
Global = one click
http://www.concrete5.org/marketplace/addons/global-areas/...