1.5.1releasedGlobal 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.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.0
1.1.81.21.31.41.5.11.5.1NoNo. 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

  1. Upload the /globalparamloader folder to your Symphony /extensions folder.
  2. Enable it by selecting the "Global Parameter Loader", choose Enable from the with-selected menu, then click Apply.

Usage

  1. View the Blueprints > Global Parameters page to add, edit, and remove Parameter Sets.
  2. Click the create new button to create your first Parameter Set. Give the Parameter Set a name.
  3. Click Add item to add a parameter. At least one parameter must be defined for each set, and each parameter must have a name.
  4. Choose any pages you wish to exclude from this Parameter Set.
  5. 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).
  6. (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

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