IMPR: Allow moving Sidebar into elements list

This commit is contained in:
Tony Air 2023-09-24 18:51:41 +02:00
parent 1364e25171
commit d96ec299c1
2 changed files with 40 additions and 0 deletions

34
src/Elements/SidebarElement.php Executable file
View File

@ -0,0 +1,34 @@
<?php
/**
* Created by PhpStorm.
* User: tony
* Date: 6/30/18
* Time: 11:54 PM
*/
namespace A2nt\ElementalBasics\Elements;
use DNADesign\Elemental\Models\BaseElement;
/**
* Class \A2nt\ElementalBasics\Elements\MapElement
*
* @property int $MapZoom
* @method \SilverStripe\ORM\ManyManyList|\A2nt\ElementalBasics\Models\MapPin[] Locations()
* @mixin \A2nt\ElementalBasics\Extensions\MapExtension
*/
class SidebarElement extends BaseElement
{
private static $icon = 'font-icon-book-open';
private static $singular_name = 'Sidebar Element';
private static $plural_name = 'Sidebar Elements';
private static $description = 'Displays sidebar among page elements';
public function getType(): string
{
return self::$singular_name;
}
}

View File

@ -0,0 +1,6 @@
<% with $Page %>
<% if $SideBarContent || $SideBarView && $SideBarView.Widgets.Count %>
$SideBarContent
$SideBarView
<% end_if %>
<% end_with %>