mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Allow to disable sidebar
This commit is contained in:
parent
03dba051bc
commit
671298a590
@ -49,6 +49,11 @@ class SiteTreeExtension extends DataExtension
|
||||
public function ShowSidebar()
|
||||
{
|
||||
$obj = $this->owner;
|
||||
|
||||
if($obj->DisableSidebar) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$area = $obj->ElementalArea();
|
||||
if (!$area) {
|
||||
return true;
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if not $DisableSidebar && $SideBarContent || $SideBarView && $SideBarView.Widgets.Count %>
|
||||
<% if $ShowSidebar %>
|
||||
<div class="content-holder content-holder__sidebar">
|
||||
<div class="{$DefaultContainer}">
|
||||
<div class="row">
|
||||
|
Loading…
Reference in New Issue
Block a user