class

Marten::Conf::GlobalSettings::Templates

Inherits Reference / Object

Allows to configure templates-related settings.

Instance methods

app_dirs

Returns a boolean indicating whether templates should be looked for inside installed applications.

Source
app_dirs=(app_dirs : Bool)

Allows to set whether templates should be looked for inside installed applications.

Source
app_dirs?

Returns a boolean indicating whether templates should be looked for inside installed applications.

Source
cached

Returns a boolean indicating whether templates should be kept in a memory cache upon being loaded and parsed.

Source
cached=(cached : Bool)

Allows to set whether templates should be kept in a memory cache upon being loaded and parsed.

By default templates will be read from the filesystem and parsed every time they need to be rendered. When setting this configuration option to true, compiled templates will be kept in memory and further renderings of the same templates will result in previous compiled templates to be reused.

Source
cached?

Returns a boolean indicating whether templates should be kept in a memory cache upon being loaded and parsed.

Source
context_producers

Returns an array of context producers that will be used to populate the context for each template.

Source
context_producers=(v)

Allows to set the context producers that will be used to populate the context for each template.

Source
dirs

Returns an array of directories where templates should be looked for.

The order of these directories is important as it defines the order in which templates are searched for.

Source
dirs=(dirs : Array(Path | String | Symbol))

Allows to set the directories where templates should be looked for.

Source
isolated_inclusions

Returns a boolean indicating whether included templates should be isolated from the outer context by default.

Source
isolated_inclusions=(isolated_inclusions : Bool)

Allows to define whether included templates should be isolated from the outer context by default.

Source
isolated_inclusions?

Returns a boolean indicating whether included templates should be isolated from the outer context by default.

Source
loaders

Returns the list of template loaders or nil

Source
loaders=(loaders : Nil | Array(Marten::Template::Loader::Base))

Allows to set the template loaders that are used. Overwrites all other options.

Source
strict_variables

Returns true if the strict variables mode is enabled.

Source
strict_variables=(strict_variables : Bool)

Alows to enable or disable the strict variables mode.

When this setting is set to true, unknown variables encountered in templates will result in Marten::Template::Errors::UnknownVariable exceptions to be raised.

Source
strict_variables?

Returns true if the strict variables mode is enabled.

Source