Sha256: e0d662776d73f4d029dc3afb00eca38a51f6a534b48e422f4a2d75ad04c985c0

Contents?: true

Size: 821 Bytes

Versions: 1

Compression:

Stored size: 821 Bytes

Contents

# frozen_string_literal: true

def initialize_homepage_content_blocks
  initializer "Feeds.content_blocks" do
    Decidim.content_blocks.register(:homepage, :feeds) do |content_block|
      content_block.cell = "decidim/posts/content_blocks/feeds"
      content_block.settings_form_cell = "decidim/posts/content_blocks/feeds_settings_form"
      content_block.public_name_key = "decidim.posts.content_blocks.feeds.name"

      content_block.settings do |settings|
        # settings.attribute :title, type: :text, translated: true
        # settings.attribute :link_text, type: :text, translated: true
        # settings.attribute :link_url, type: :text, translated: true
        # settings.attribute :count, type: :integer, default: 3
        settings.attribute :component_id, type: :integer
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-posts-1.0.0 lib/decidim/posts/content_blocks/content_blocks_homepage.rb