Global Stack in 5.5.
Permalink 3 users found helpfulTo do that, all you have to do is add the GlobalArea code to your page type template, but use a *different* name than what already exists in the list of stacks. Then the first time you visit a page using that page type, Concrete5 will see the code and automagically create the Global Area for you in the Stacks dashboard. (But if you use the same name as a stack that already exists, C5 will not create the global area for you and instead use the normal one that's already there).
The code to put into your page type template would be something like this:
<?php $a = new GlobalArea('My new name'); $a->display(); ?>
Super-simple, and really the best new feature in 5.5 (in my humble opinion) -- I will use these for site footers and sidebars all the time from now on.
-Jordan
http://www.concrete5.org/documentation/how-tos/developers/concrete5...
However, someone should really add jordanlev's above explanation of how to do a global stack as it is not at all covered in the above link.
Do not try to add a stack to multiple pages via:
<?php $b = Block::getByName('Header Menu'); $b->display(); ?>
as the view.js and views.css files will not load, instead use a global area using jordanlev's code above. I don't think this is a bug but rather me confusing myself...
<?php
$a = new GlobalArea('Site Name');
$a->display();
?>
@jordanlev Wha...? Are you talking about in relation to scrapbooks?
The difference between a global stack and a "normal" stack is that the global stack is for all your webpages, whereas the "normal" stack is for a single page (a collection of blocks).
To add a "normal" stack; you would go to the dashboard and select "stacks", click on "Add stack" and type in the field provided a new name, then select it and add your specific blocks for example content (or whatever you like), write a line of content, save it and return to website. That's a "single" stack, you should use several blocks to group them together, hence called stack.
To add a global stack; you would go to the dashboard and select Page Types, select the Page Type you would like to edit and click on Defaults => Edit this Page, Add to the section you want to update across your site. Exit Edit Mode, Publish your Edits and return to see your changes. This only applies to any new pages you add, however if you want to apply this to all your existing pages you would select child pages.
Check out this link, too:
http://www.concrete5.org/documentation/general-topics/scrapbooks/...
Let me know if that explains it, happy CONCRETING ;-)
LL