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