5.4 Bugfix - Areas from foriegn pages w/ Layouts

Permalink 1 user found helpful
I use something like

$home = $Page::getByID(HOME_CID);
$a->Display($home);


This is great for displaying content that's consistent across multiple pages _and_ multiple page types, as well as keeping those areas from going into edit mode without setting advanced permissions on the area and blocks.

With the new layouts feature, this was resulting in the layout being shown but the actual sub-areas would display using the current page, not the home page.

To fix, I changed line 183 of /concrete/models/layouts.php

Find
$this->displayTableGrid($this->rows,$this->columns);


Replace
$this->displayTableGrid($this->rows,$this->columns, $c);


Use at your own risk, there could be other stuff this breaks ;)

hereNT
 
Tony replied on at Permalink Reply
Tony
good catch. this fix shouldn't break anything so i'll add it to the core.
hereNT replied on at Permalink Reply
hereNT
Well, it was either fix it or try and do some crazy stuff with scrapbooks that would be a ton of work...

:)