FIX: Summary, add legacy support for Page.ss

This commit is contained in:
Tony Air 2023-11-27 17:08:33 +02:00
parent efa97aaaf3
commit 33768fc844
2 changed files with 6 additions and 2 deletions

View File

@ -103,6 +103,10 @@ class SiteTreeExtension extends DataExtension
return $this->_cached['summary' . $wordsToDisplay]; return $this->_cached['summary' . $wordsToDisplay];
} }
if(!method_exists($obj, 'ElementalArea')) {
return;
}
$element = ElementContent::get()->filter([ $element = ElementContent::get()->filter([
'ParentID' => $obj->ElementalArea()->ID, 'ParentID' => $obj->ElementalArea()->ID,
'HTML:not' => [null], 'HTML:not' => [null],

View File

@ -16,8 +16,8 @@
<% include Header %> <% include Header %>
</header> </header>
<div id="MainContent" class="page-content" data-ajax-region="LayoutAjax"> <div id="MainContent" class="page-content" data-ajax-region="LayoutAjax"<% if $isLegacy %> data-legacy="true"<% end_if %>>
<% if $isFormResponse %> <% if $isFormResponse || $isLegacy %>
<%-- Legacy code compatibility --%> <%-- Legacy code compatibility --%>
<% include MainContent Layout=$Layout %> <% include MainContent Layout=$Layout %>
<% end_if %> <% end_if %>