Download the PHP package otago/tiles without Composer
On this page you can find all versions of the php package otago/tiles. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package tiles
Tiling system for SilverStripe CMS
Allows you to create an elemental grid inside SilverStripe. Features include:
- drag & reorder them inside the CMS
- easily create your own tiles
- delete and edit tiles easily
It also comes with some basic tiles out of the box.
Install
Run this in your command line:
To expose the modules resouces:
The module requires elemental blocks. If you don't have this module, you'll be prompted on install.
Customise your tiles
Put your own templates in your themes/\<themename>/templates/Tiles/tilename.ss. For example, to make your own ContentTile in the simple theme, create a file in themes/simple/templates/Tiles/ContentTile.ss
If you want to support MSIE, you can use the -ms-grid-row and -ms-grid-column CSS values with $Col and $Row to have the grid display correctly.
Build source
You'll need node 6. Boo.
to get env vars on windows:
This module uses fancy and modern react for rendering. So you know it's fast and snappy.
Usage
After a composer install you'll have the tile module as an element. So you don't need to do anything (unless you've restricted the elements on each page).
If you want to put tilefield directly on a page, you can do this too. The following example shows you how:
Allowing the user to specify how many columns they want
You can provide an DataObject where the Cols val will be written to. so you can have 3,2 or however many cols you want wide:
Specifying types of tiles in field
You can limit the CMS dropdown to a limited number of tiles. This is handy when you've have a page where you only want a certain type of tile. This is done by passing in the $dataList parameter:
upgrading
Here's the modulelegacy.yml file to convert your tiles from SS 3 to 4:
All versions of tiles with dependencies
dnadesign/silverstripe-elemental Version ^4.0
silverstripe/framework Version ~4.2