unclecheese/silverstripe-green-addons

Addons for the silverstripe-green module that provide template parsing and code generation

dev-master 2016-10-19 01:22 UTC

README

This module provides additional feautres to the silverstripe-green module.

Installation

composer require unclecheese/silverstripe-green-addons

Auto-populating content

You can parse your index.ss template for variables and auto-create content using a task:

$ framework/sake dev/tasks/GreenTemplateParserTask module=my-design-module

This task looks at both variables and blocks defined in your template, converts them into the appropriate structure in JSON or YAML, and assigns placeholder content to them.

This feature is also available when editing YAML in the CMS. Just click (Load from template) above the code editor, and it will populate the editor automatically.