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()
|
public function ShowSidebar()
|
||||||
{
|
{
|
||||||
$obj = $this->owner;
|
$obj = $this->owner;
|
||||||
|
|
||||||
|
if($obj->DisableSidebar) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$area = $obj->ElementalArea();
|
$area = $obj->ElementalArea();
|
||||||
if (!$area) {
|
if (!$area) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if not $DisableSidebar && $SideBarContent || $SideBarView && $SideBarView.Widgets.Count %>
|
<% if $ShowSidebar %>
|
||||||
<div class="content-holder content-holder__sidebar">
|
<div class="content-holder content-holder__sidebar">
|
||||||
<div class="{$DefaultContainer}">
|
<div class="{$DefaultContainer}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
Reference in New Issue
Block a user