zizther / replace-variable
Replace general or config variables, and global fields
Requires
- craftcms/cms: ^3.0.0
Requires (Dev)
- codeception/codeception: ^3.0
- craftcms/cms: ^3.2.0
- vlucas/phpdotenv: ^3.0
This package is not auto-updated.
Last update: 2020-09-17 11:48:05 UTC
README
This plugin has been replaced with a cleaner more powerful plugin Craft Dynamic Variables
Replace general or config variables, and global fields
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require zizther/replace-variable
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Replace Variable.
Replace Variable Overview
Can match general or config variables, and global fields For example:
- {siteName}
- {config.general.custom.variableName}
- {config.customConfigFile.variableName}
- {globalHandle.fieldHandle}
Using Replace Variable
Filter
{{ 'something goes here {globalHandle.fieldHandle}' | rv }}
Function
{% set this = rv('something goes here {globalHandle.fieldHandle}') %}