mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
FIX: Sidebar
This commit is contained in:
parent
f77f7acd55
commit
bc48151da8
@ -58,19 +58,16 @@ class SiteTreeExtension extends DataExtension
|
||||
if (!$area) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$els = $area->Elements();
|
||||
if (!$els) {
|
||||
return true;
|
||||
}
|
||||
$els = $els->find('ClassName', SidebarElement::class);
|
||||
if (!$els) {
|
||||
$sidebarEl = $els->find('ClassName', SidebarElement::class)?->first();
|
||||
if ($sidebarEl) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($els->first()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($obj->SideBarContent) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user