Class: SectionDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
app/drops/section_drop.rb

Overview

Represents a section of content inside a PageDrop. Each SectionDrop represents a “Section” in the page editor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#id ⇒ Integer (readonly)

Returns this SectionDrop's id. This will be unique within a PageDrop, but different PageDrops can reuse IDs.

Returns:

  • (Integer)

#settings ⇒ ThemeSettingsDrop (readonly)

Returns a ThemeSettingsDrop representing this SectionDrop's settings.

Returns:

#type ⇒ String (readonly)

Returns:

  • (String)

Instance Method Details

#additional_section_classes ⇒ String

Returns additional HTML classes that this section should have.

Returns:

  • (String)

#blocks ⇒ Array<SectionBlockDrop>

Returns the SectionBlockDrops contained within this SectionDrop. Each SectionBlockDrop represents an entry under “Content” in the page editor.

Returns:

#blocks_count ⇒ Integer

Returns the number of SectionBlockDrops within this SectionDrop.

Returns:

  • (Integer)

#setting_attrs(id) ⇒ Hash{String->Object

Returns a Hash of data attributes for the page editor to use. This should not be used directly; instead Liquid::Simplero::Filters#setting_attrs should be used.

Parameters:

  • id —

    The name of the setting

Returns:

  • (Hash{String->Object) —

    ]

#title ⇒ String

Deprecated.

Returns:

  • (String)