mod_admin_config

Add support for editing the site’s configuration values, as accessed through model#config.

The page in the admin is a list of every configuration module, key and textual value. Entries can be added, removed, and edited, if the user has the permission to do so.

When a value is longer than 65 characters, it will be truncated in the admin config list view. To view the whole value, click the row.

SSL certificates configuration

Via the menu System > SSL Certificates all available certificates can be viewed.

The SSL modules add a panel here using a template _admin_config_ssl_panel.[module_name].tpl. Only the SSL modules providing a certificate are listed.

Here the module mod_ssl_letsencrypt lets you request a free certificate from the LetsEncrypt service.

Email configuration

The System > Email configuration page groups the settings used for outgoing e-mail. It also provides a form for sending a test message, which is useful for checking the effective SMTP configuration.

Other e-mail modules can add their own settings panel by providing an _admin_config_email_panel.tpl template. The page uses an all include, so every matching module template is rendered. Configuration values shown by those panels are available through model#config.

Accepted Events

This module handles the following notifier callbacks:

  • observe_admin_menu: Add site-configuration menu entries for editable config sections.

Delegate callbacks:

  • event/2 with submit messages: config_save, test_email.
  • event/2 with the regenerate_self_signed postback: Replace Zotonic’s fallback certificate for the site hostname.

Edit on GitHub

Observes

Models

Models

admin_config

Model for admin configuration views, including SSL certificate info, security directory info, and selected module config values.

Controllers

Controllers

controller_admin_config

Shows the admin config editor. Here you can edit the key/value pairs of model#config.

Dispatch rules

Actions

Actions

config_delete

Trigger the deletion of a configuration value. Used in the admin.

Actions

config_toggle

Toggle a configuration value. Used in the admin, for instance when displaying a “live” checkbox the state of which should reflect a config value.

Actions

dialog_config_delete

Open a dialog that asks confirmation to delete a configuration key/value pair.

Actions

dialog_config_new

Open a dialog to create a new configuration key/value pair.

See also

Models

config

Zotonic has two places where a site's configuration is kept: