m_site (zotonic_core v1.0.0-rc.10)

Model for the zotonic site configuration

Link to this section Summary

Functions

Return the complete site configuration
Return the current DTAP environment
Fetch a key from the site configuration
Fetch a nested key from the site configuration
Fetch the value for the key from a model source
Put the value in the site config (temporary, till restart)

Link to this section Functions

-spec all(atom() | z:context()) -> list().
Return the complete site configuration
Link to this function

environment(Context)

-spec environment(z:context()) -> z:environment().
Return the current DTAP environment
-spec get(atom(), z:context() | atom()) -> term() | undefined.
Fetch a key from the site configuration
Link to this function

get(Module, Key, Context)

-spec get(atom(), atom(), z:context()) -> term() | undefined.
Fetch a nested key from the site configuration
Link to this function

load_config(Context)

-spec load_config(atom() | z:context()) -> ok | {error, term()}.
Link to this function

load_config(Context, Config)

-spec load_config(atom() | z:context(), list()) -> ok.
Link to this function

m_get(Rest, Msg, Context)

-spec m_get(list(), zotonic_model:opt_msg(), z:context()) -> zotonic_model:return().
Fetch the value for the key from a model source
Link to this function

put(Module, Key, Value, Context)

-spec put(atom(), atom(), term(), z:context()) -> ok.
Put the value in the site config (temporary, till restart)