suilven / template-env-checker
Adds ability to check environment from within a template.
Package info
github.com/gordonbanderson/silverstripe-template-env-checker
Type:silverstripe-vendormodule
pkg:composer/suilven/template-env-checker
1.0.3
2018-09-15 15:31 UTC
Requires
- php: >=5.6.0
- silverstripe/framework: ^4@dev
This package is auto-updated.
Last update: 2026-02-27 10:56:55 UTC
README
Usage
In a template, the following methods are available to check the environment
IsDevIsTestIsLive
The use case the drove the creation of this module is one of whether to serve individual or compressed assets.
<% if $IsDev %>
<!-- serve individual CSS files -->
<% else %>
<!-- serve compressed concatenated CSS file -->
<% end %>
Issues
Please use the [GitHub issue tracker][issues] for bug reports and feature requests.
Contribution
Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.
Maintainers
License
BSD-3-Clause © Gordon Anderson