Module m_site

Model for the zotonic site configuration.

Copyright © 2009-2021 Marc Worrell

Behaviours: zotonic_model.

Authors: Marc Worrell (marc@worrell.nl).

Description

Model for the zotonic site configuration

Function Index

all/1Return the complete site configuration.
environment/1Return the current DTAP environment.
get/2Fetch a key from the site configuration.
get/3Fetch a nested key from the site configuration.
load_config/1
load_config/2
m_get/3Fetch the value for the key from a model source.
put/4Put the value in the site config (temporary, till restart).

Function Details

all/1

all(Context::atom() | z:context()) -> list()

Return the complete site configuration

environment/1

environment(Context::z:context()) -> z:environment()

Return the current DTAP environment

get/2

get(Key::atom(), Site::z:context() | atom()) -> term() | undefined

Fetch a key from the site configuration

get/3

get(Module::atom(), Key::atom(), Context::z:context()) -> term() | undefined

Fetch a nested key from the site configuration

load_config/1

load_config(Context::atom() | z:context()) -> ok | {error, term()}

load_config/2

load_config(Context::atom() | z:context(), Config::list()) -> ok

m_get/3

m_get(Rest::list(), Msg::zotonic_model:opt_msg(), Context::z:context()) -> zotonic_model:return()

Fetch the value for the key from a model source

put/4

put(Module::atom(), Key::atom(), Value::term(), Context::z:context()) -> ok

Put the value in the site config (temporary, till restart)


Generated by EDoc