webmaxsk / silverstripe-components
Create components using SilverStripe.
Package info
github.com/Webmaxsk/silverstripe-components
Type:silverstripe-vendormodule
pkg:composer/webmaxsk/silverstripe-components
3.2.1
2019-04-29 03:08 UTC
Requires
- php: >=5.4
- silverstripe/framework: ~4.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ^3.0
Replaces
This package is auto-updated.
Last update: 2026-05-20 15:00:33 UTC
README
This module allows you to use special <:TemplateName> syntax to include templates. This allows you to pass inner HTML into a template, much like you can do in React with the children properties. Using the <:TemplateName> syntax will not automatically pass variables in the current scope like <% include %>.
<:MyButtonTemplate
icon="fa fa-icon"
title="$Title"
>
<span class="text">
Look at me! Passing HTML in here!
</span>
</:MyButtonTemplate>
<:SelfClosingTag passvariable="hey" />
Composer Install
composer require symbiote/silverstripe-components:~1.0
composer require symbiote/silverstripe-components:~3.0
Requirements
- PHP 5.6+
- SilverStripe 4.0+
Documentation
Credits
- Cam Spiers for his SilverStripe Compose Parser module. This utilizes and builds upon his work from half a decade ago!