Stack Attributes
Permalink
Hi folks,
I've added a few stacks to a normal Area. No I want to loop them in my template to retrieve an attribute I've assigned via the sitemap. Does anyone knows how that works?
This is what I came up with so far:
If a stack has a certain attribute, I'd like to wrap it with a certain <div>. I know about setBlockWrapperStart, but that applies to a blocks within an area, something I don't want.
Hope someone can help!
I've added a few stacks to a normal Area. No I want to loop them in my template to retrieve an attribute I've assigned via the sitemap. Does anyone knows how that works?
This is what I came up with so far:
<?php $a = new Area('Column 1'); $blocks = $a->getAreaBlocksArray($c); foreach($blocks as $block){ //unfortunately, this gives the collection of the whole page, not of the 'stackpage' $bco = $block->getBlockCollectionObject(); var_dump($bco->getAttribute('box_no_wrapper')); }
If a stack has a certain attribute, I'd like to wrap it with a certain <div>. I know about setBlockWrapperStart, but that applies to a blocks within an area, something I don't want.
Hope someone can help!