Get an Area from Parent Page doesn't work 100%
Permalink
Hi there,
maybe someone also discovered this behaviour and may help.
I created some special pages on my website where there child-pages - let's say on level 3 in the pagetree hirarchy - takes some data from its parent page.
It check it this way:
that works fine when accessing data like
and also with
getting the Area "HeaderBanner" from the Parent Page I get the Content shown correctly, but without a modified block style design - if applied.
Any ideas?
thanks a lot
sk01
maybe someone also discovered this behaviour and may help.
I created some special pages on my website where there child-pages - let's say on level 3 in the pagetree hirarchy - takes some data from its parent page.
It check it this way:
<?php if ($c->getCollectionTypeHandle() == "specialchild") $page = Page::getByID($c->getCollectionParentID()); else $page = Page::getCurrentPage(); ?>
that works fine when accessing data like
$page->getCollectionAttributeValue('specialvalue1')
and also with
<?php $a = new Area('HeaderBanner'); $a->display($page); ?>
getting the Area "HeaderBanner" from the Parent Page I get the Content shown correctly, but without a modified block style design - if applied.
Any ideas?
thanks a lot
sk01
You could just put a Parent Area block on the subpages and that will do it all for you.
http://www.concrete5.org/marketplace/addons/parent-area/...
http://www.concrete5.org/marketplace/addons/parent-area/...
I just had the same issue, because within the view, the header items for a given area's blocks have already been aggregated. It's too late to insert them into the head, so you would have to do something different to get the relevant block assets to load as well.
http://www.concrete5.org/documentation/developers/pages/areas...