1
2
3
4
5
6

Overview

Create and edit system wide variables via the administration interface.
Good usable for editors.

We have developed this module for a conference platform to solve the following tasks:

  1. Store, call and edit system wide variables in a Drupal installation
  2. Place and edit variables in CSS files (it works a little bit like a CSS preprocessor)
  3. Deliver simple key value pairs in JSON files without authentification
  4. Manual import and export (as JSON) between Drupal installations. Can also be used for simple backups of the modules configuration and data.

Configuration

You find the configuration page of the Editablevars module below this link:
/admin/config/system/editablevar

You can create there "variable groups", to organize your variables and choose the favored type of group ("Simple" vs "File" vs "JSON").

In templates you can use the variables f.e. like this:

{% if editablevar('showhide_widget_chat', 'show') == 'show' %}
    {{ widget_chat|raw }}
{% endif %}

or

{% set statistics_in_head = editablevar('template_head_statistics', '') %}
{{ statistics_in_head|raw }}

or

<div id="meta" style="background-color:{{ editablevar('style_header_meta_background', 'white') }};">
("white" ist the default)

You can also call the variables in the CKeditor5 as token. There is a content filter avaliable.

Supporting organizations: 
Development

Project information

Releases