app/models/cms_layout.rb
# -- Instance Methods -----------------------------------------------------
# magical merging tag is {cms:page:content} If parent layout has this tag
# defined its content will be merged. If no such tag found, parent content
# is ignored.
Instance Methods
magical merging tag is {cms:page:content} If parent layout has this tag
defined its content will be merged. If no such tag found, parent content
is ignored.
Instance Methods magical merging tag is { cms : page : content } If parent layout has this tag defined its content will be merged . If no such tag found parent content is ignored .
def merged_content
    if parent
      regex = /\{\{\s*cms:page:content:?(?:(?::text)|(?::rich_text))?\s*\}\}/
      if parent.merged_content.match(regex)
        parent.merged_content.gsub(regex, content)
      else
        content
      end
    else
      content
    end
  end
def merged_content if parent regex = / \{ \{ \s *cms:page:content:?(?:(?::text)|(?::rich_text))? \s * \} \} / if parent . merged_content . match ( regex ) parent . merged_content . gsub ( regex , content ) else content end else content end end
Instance Methods
magical merging tag is {cms:page:content} If parent layout has this tag
defined its content will be merged.
Instance Methods magical merging tag is { cms : page : content } If parent layout has this tag defined its content will be merged .