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
1a98f25c92
commit
decfc9edac
@ -63,6 +63,7 @@ class SiteTreeExtension extends DataExtension
|
|||||||
if (!$els) {
|
if (!$els) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sidebarEl = $els->find('ClassName', SidebarElement::class)?->first();
|
$sidebarEl = $els->find('ClassName', SidebarElement::class)?->first();
|
||||||
if ($sidebarEl) {
|
if ($sidebarEl) {
|
||||||
return true;
|
return true;
|
||||||
@ -71,7 +72,8 @@ class SiteTreeExtension extends DataExtension
|
|||||||
if ($obj->SideBarContent) {
|
if ($obj->SideBarContent) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (method_exists($obj, 'SideBarView')) {
|
|
||||||
|
if (is_callable([$obj,'SideBarView'], true)) {
|
||||||
$view = $obj->SideBarView();
|
$view = $obj->SideBarView();
|
||||||
|
|
||||||
if ($view && $view->Widgets()->count()) {
|
if ($view && $view->Widgets()->count()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user