Module: PagesCore::Templates
- Defined in:
- lib/pages_core/templates.rb,
lib/pages_core/templates/configuration.rb,
lib/pages_core/templates/controller_actions.rb,
lib/pages_core/templates/block_configuration.rb,
lib/pages_core/templates/configuration_proxy.rb,
lib/pages_core/templates/configuration_handler.rb,
lib/pages_core/templates/template_configuration.rb
Defined Under Namespace
Modules: ControllerActions
Classes: BlockConfiguration, Configuration, ConfigurationHandler, ConfigurationProxy, TemplateConfiguration
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
Also known as:
config
139
140
141
142
|
# File 'lib/pages_core/templates/template_configuration.rb', line 139
def configuration
load_default_configuration unless defined? @configuration
@configuration
end
|
119
120
121
122
123
124
125
126
127
|
# File 'lib/pages_core/templates/template_configuration.rb', line 119
def configure(options = {}, &)
case options[:reset]
when :defaults
load_default_configuration
when true
@configuration = PagesCore::Templates::Configuration.new
end
yield configuration if block_given?
end
|
.load_default_configuration ⇒ Object
129
130
131
132
133
134
135
136
137
|
# File 'lib/pages_core/templates/template_configuration.rb', line 129
def load_default_configuration
@configuration = PagesCore::Templates::Configuration.new
config.default do |default|
default_configuration(default)
default_block_configuration(default)
end
end
|
145
146
147
148
149
150
|
# File 'lib/pages_core/templates/template_configuration.rb', line 145
def metadata_block_names
%i[meta_title
meta_description
open_graph_title
open_graph_description]
end
|
.names ⇒ Object
17
18
19
|
# File 'lib/pages_core/templates.rb', line 17
def names
@names ||= find_all_templates
end
|