composedcreative/envvaluereplace

Adds the 'envValueReplace' twig filter to Craft CMS projects

0.1.0 2016-06-02 20:34 UTC

This package is not auto-updated.

Last update: 2024-04-22 10:06:16 UTC


README

Installation

composer require composed/envvaluereplace

Example

Add the following to either the general or per-environment config/general.php values

'envValueReplacements' => [
    'search for' => 'replace with'
]

Then use in your template code

{% set test = "this string contains the search for value" %}
{{ test|envValueReplace }}

This example will output this string contains the replace with value

Roadmap

  • Improve documentation (eg chained replacement example)