suilven / template-env-checker
Adds ability to check environment from within a template.
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: >=5.6.0
- silverstripe/framework: ^4@dev
This package is auto-updated.
Last update: 2024-11-27 08:18:55 UTC
README
Usage
In a template, the following methods are available to check the environment
IsDev
IsTest
IsLive
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