1.5.2releasedGlobal Parameter Loader
Add parameters to the parameter pool
Clone URLhttps://github.com/symphonists/globalparamloader.git
Add as a submodulegit submodule add https://github.com/symphonists/globalparamloader.git extensions/globalparamloader --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.1.8 | 1.2 | 1.3 | 1.4 | 1.5.2 | 1.5.1 | No | No | No | No | No | No | No | No | No | No | No | No. Soon? |
Readme
Global Parameter Loader
Allows you to add sets of parameters to Symphony's parameter pool while excluding specified pages. Furthermore, valid PHP code is parsed before adding the parameter to the parameter pool.
Warning: safe evaluation has not been added yet. Do not enable this extension if you are not absolutely sure that your Symphony installation is secure.
Installation
- Upload the
/globalparamloader
folder to your Symphony/extensions
folder. - Enable it by selecting the "Global Parameter Loader", choose Enable from the with-selected menu, then click Apply.
Usage
- View the Blueprints > Global Parameters page to add, edit, and remove Parameter Sets.
- Click the create new button to create your first Parameter Set. Give the Parameter Set a name.
- Click Add item to add a parameter. At least one parameter must be defined for each set, and each parameter must have a name.
- Choose any pages you wish to exclude from this Parameter Set.
- Click the Create Set button. Now, go see your newly added parameters at your pages in Parameter debug mode (add
?debug=params
to the page URL). - (optional) If you want your parameters to be evaluated as PHP code you need to enable it in the global preferences section.
Examples
Example A: Add user IP address to the parameter pool
Add a parameter with parameter value: return ($_SERVER['REMOTE_ADDR']);
Example B: Add domain name and extension to the parameter pool
Add a parameter with parameter value: return array_pop(explode('.', $_SERVER['SERVER_NAME'], 2));
Acknowledgments
The Symphony development team and all contributors for such an amazing content management system. Rowan Lewis for both his emailtemplatefilter and globalresourceloader extensions, on which this extension is based. Marcin Konicki for telling me to reinstall this extension to make it work. [Carsten de Vries]
Version history
Requires Symphony 2.4
- PHP7 compatibility
Symphony 2.4 to 2.5
- Fix issue when saving multiple parameters
Requires Symphony 2.4
- Updates for Symphony 2.4
- Show Pages by title instead of path
Symphony 2.3 to 2.3.6
Symphony 2.2 to 2.2.x
- Fix bad call to the `saveConfig()` function
Symphony 2.0.6 to 2.2.x
- Fixed issue when no excluded page was selected
- Add translatable strings
- Allow `eval()` to be turned on and off in the preferences (off by default)
- Updated for Symphony 2.2 compatibility
Symphony 2.0 to 2.0.5
- Initial public release