Sha256: 1c8b843c033c399d71f2d65fdd3a16746d5d95d90160898e73c792d93533bfd8

Contents?: true

Size: 704 Bytes

Versions: 139

Compression:

Stored size: 704 Bytes

Contents

# frozen_string_literal: true

require_relative "../base"

module Alchemy
  module Generators
    class MenusGenerator < Base
      desc "This generator generates Alchemy menu partials."
      source_root File.expand_path("templates", __dir__)

      def create_partials
        menus = Alchemy::Node.available_menu_names
        return unless menus

        menus.each do |menu|
          conditional_template "wrapper.html.#{template_engine}",
            "app/views/alchemy/menus/#{menu}/_wrapper.html.#{template_engine}"
          conditional_template "node.html.#{template_engine}",
            "app/views/alchemy/menus/#{menu}/_node.html.#{template_engine}"
        end
      end
    end
  end
end

Version data entries

139 entries across 139 versions & 1 rubygems

Version Path
alchemy_cms-7.3.5 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.8 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.1.13 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.0.16 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.3.4 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.3.3 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.3.2 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.7 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.3.1 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.3.0 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.6 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.5 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.1.12 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.0.15 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-6.1.10 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.4 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.1.11 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.3 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.1.10 lib/generators/alchemy/menus/menus_generator.rb
alchemy_cms-7.2.2 lib/generators/alchemy/menus/menus_generator.rb