Download the PHP package toastnz/blocks-layouts without Composer
On this page you can find all versions of the php package toastnz/blocks-layouts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download toastnz/blocks-layouts
More information about toastnz/blocks-layouts
Files in toastnz/blocks-layouts
Package blocks-layouts
Short Description Silverstripe content blocks module
License BSD-3-Clause
Informations about the package blocks-layouts
SilverStripe Blocks
Simple content blocks system. Nothing fancy, easy to implement.
Requirements
See composer.json
Installation
Add the following to your config.yml
(optional):
Use Page
or other class that extends SiteTree
.
In your Layout/Page.ss
template, add the following:
Configuration
Add / remove available block classes
Add / remove available alternate block layouts
"layout_src": directory that holds folders of different layouts with .ss templates "layout_icon_src": directory that holds all the layout icons "layout_dist_dir": specificed the css for block layouts
CSS file will only be included with the syntax of 'theme/themename/dist/styles/$LayoutName-$BlockType.css"
Ensure there are at least one CustomBlock.ss and 'customblock.svg' icon in each of the specified directory. Layout will be available for all subsites.
.ss template naming
You may have multiple layouts, please ensure you have the block.ss created under a new layout folder in the src directory.
e.g. 'app/templates/Toast/Blocks/CustomLayoutNameOne/ImageBlock.ss'
or 'app/templates/Toast/Blocks/CustomLayoutNameTwo/ImageBlock.ss'
Layout icon naming:
Please ensure the layout icon are named after the block name are all in lowercase, e.g. customblock.svg.
e.g. 'app/client/images/layout-icons/customlayoutone/customblock.svg'
or 'app/templates/Toast/Blocks/customlayouttwo/customblock.svg'
Icon extensions
Allowed extension: 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg'
Create a custom block
Extend Block
to create a new block type.
/themes/default/templates/Toast/Blocks/MyBlock.ss
:
Todo:
All versions of blocks-layouts with dependencies
silverstripe/cms Version ^5
silverstripe/framework Version ^5
composer/installers Version *
symbiote/silverstripe-gridfieldextensions Version ^4
toastnz/linkable Version ^3
undefinedoffset/sortablegridfield Version ^2.0.4
axllent/silverstripe-form-fields Version ^1.5
silverstripe/userforms Version ^6