mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
IMPR: Allow moving Sidebar into elements list
This commit is contained in:
parent
1364e25171
commit
d96ec299c1
34
src/Elements/SidebarElement.php
Executable file
34
src/Elements/SidebarElement.php
Executable 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;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<% with $Page %>
|
||||
<% if $SideBarContent || $SideBarView && $SideBarView.Widgets.Count %>
|
||||
$SideBarContent
|
||||
$SideBarView
|
||||
<% end_if %>
|
||||
<% end_with %>
|
Loading…
Reference in New Issue
Block a user