Sha256: 28ad4d800921ee0dcf3fe25f5b7a4c6acb8a504b9697be6904f50b100fb058a0
Contents?: true
Size: 681 Bytes
Versions: 1
Compression:
Stored size: 681 Bytes
Contents
module Skyline::Rendering::Helpers::ColumnHelper # Devides the sections into columns depending on splitter location # # @param page_version [ArticleVersion] The ArticleVersion to get section from to split # # @return [Array<Array<Section>>]:: An array of columns each containing and array of sections. def page_sections_per_column(page_version) sections_per_col ||= [] col = 0 page_version.sections.each do |section| if section.sectionable_type == "Skyline::Sections::SplitterSection" col += 1 else sections_per_col[col] ||= [] sections_per_col[col].push(section) end end sections_per_col end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
skylinecms-3.0.7 | lib/skyline/rendering/helpers/column_helper.rb |