Class: Alchemy::Generators::PageLayoutsGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/alchemy/page_layouts/page_layouts_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_partialsObject



11
12
13
14
15
16
17
18
19
# File 'lib/generators/alchemy/page_layouts/page_layouts_generator.rb', line 11

def create_partials
  @page_layouts = load_alchemy_yaml("page_layouts.yml")
  return unless @page_layouts

  @page_layouts.each do |page_layout|
    @page_layout_name = page_layout["name"].underscore
    conditional_template "layout.html.#{template_engine}", "#{page_layouts_dir}/_#{@page_layout_name}.html.#{template_engine}"
  end
end