Download the PHP package pixelpoems/silverstripe-layout-options without Composer
On this page you can find all versions of the php package pixelpoems/silverstripe-layout-options. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pixelpoems/silverstripe-layout-options
More information about pixelpoems/silverstripe-layout-options
Files in pixelpoems/silverstripe-layout-options
Package silverstripe-layout-options
Short Description Silverstripe Module to attach multiple layout options to pages and elements.
License BSD-3-Clause
Informations about the package silverstripe-layout-options
Silverstripe Layout Options Module
This module provides extensions for layout options. The options can be attached to pages, elements or each data object. By default this module comes with options for text, background and width. Furthermore, this package contains a selection field wich is based on color palate field by heyday.
- Requirements
- Installation
- Configuration
- Default Layout Options
- Update Options
- Reporting Issues
Requirements
- Silverstripe CMS >=4.0
- Silverstripe Framework >=4.0
- Versioned Admin >=1.0
- Silverstripe Color Palette Field ^2.1
- Silverstripe Selection Field ^1.0
Installation
Configuration
Add the desired extension on Page:
or Element (if you use Elemental form DNADesign e.g.):
The fields will appear in the order the extensions are added within the yml config.
Each entity can be hidden if they should not appear e.g.:
Default Layout Options
Text
Background
Width
Image
Update Options
For each option set, you can use a hook to update/expand the options from which the user can choose.
To configure the options for the heading tag, text color, text align, background color and width, you can add config variables like this:
The options, which are configured in the yml file, will overwrite the default options!
Otherwise, you can use the following hooks to update the options or add new ones:
Holder Classes
This module comes also with an extension of the DNADesign Elemental Base Element.
This extension adds holder classes to the element. The holder classes are a combination of the layout options and a el-classname
class. This holder class can be used to style the element in the frontend. The holder class is added to the holder div of the element.
If you want to manipulate or add your custom layout classes to this holder class, you can use the following hook:
Reporting Issues
Please create an issue for any bugs you've found, or features you're missing.
All versions of silverstripe-layout-options with dependencies
silverstripe/cms Version >=4
silverstripe/framework Version >=4
silverstripe/vendor-plugin Version >=1
pixelpoems/silverstripe-selection-field Version ^1.1.0