mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
IMPROVEMENT: Page Default container type
This commit is contained in:
parent
f427afdcd3
commit
e6972464de
@ -10,6 +10,9 @@ SilverStripe\View\SSViewer:
|
||||
- '$public'
|
||||
- '$default'
|
||||
|
||||
Page:
|
||||
default_container_class: 'container'
|
||||
|
||||
#SilverStripe\Admin\LeftAndMain:
|
||||
# extra_requirements_javascript:
|
||||
# - 'colymba/gridfield-bulk-editing-tools:client/dist/js/main.js'
|
||||
|
@ -216,7 +216,7 @@ class ElementRows extends DataExtension
|
||||
$container_styles = array_keys(self::$container_styles);
|
||||
|
||||
if (!$type && $this->isRoot()) {
|
||||
$type = $container_styles[0];
|
||||
$type = \Page::DefaultContainer();
|
||||
}
|
||||
|
||||
return $type;
|
||||
|
@ -9,6 +9,13 @@ use DNADesign\Elemental\Models\ElementContent;
|
||||
|
||||
class Page extends SiteTree
|
||||
{
|
||||
private static $default_container_class = 'container';
|
||||
|
||||
public static function DefaultContainer()
|
||||
{
|
||||
return self::config()->get('default_container_class');
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows custom summary of the post, otherwise
|
||||
* Displays summary of the first content element
|
||||
|
Loading…
Reference in New Issue
Block a user