How to get stack id from the blocks within a wrapper stack?
Permalink
I have custom blocks added within a stack. Stack wrapper is then applied on a page by using a custom template.
For example, this is my stack custom template at '/blocks/core_stack_display/templates/mystackwrapper.php':
Here I have used $stID in
I would like to share the same $stID within my custom blocks inside the stack. Is it possible to do so?
For example, this is my stack custom template at '/blocks/core_stack_display/templates/mystackwrapper.php':
defined('C5_EXECUTE') or die("Access Denied."); $c = Page::getCurrentPage(); $cp = new Permissions($c); if ($cp->canViewPageVersions()) { $stack = Stack::getByID($stID); } else { $stack = Stack::getByID($stID, 'ACTIVE'); } echo '<div id="stackwrapper-'.$stID.'">'; if (is_object($stack)) { $ax = Area::get($stack, STACKS_AREA_NAME); $axp = new Permissions($ax); if ($axp->canRead()) { $ax->display($stack); }
Viewing 15 lines of 17 lines. View entire code block.
Here I have used $stID in
echo '<div id="stackwrapper-'.$stID.'">';
I would like to share the same $stID within my custom blocks inside the stack. Is it possible to do so?