Method: Alchemy::Site::Layout#page_layout_names

Defined in:
app/models/alchemy/site/layout.rb

#page_layout_names(layoutpages: false) ⇒ Array<String>

Returns sites page layout names

If no site layout file is defined all page layouts are returned

Parameters:

  • layoutpages (Boolean) (defaults to: false)

    Return layout pages only (default false)

Returns:

  • (Array<String>)

    Array of page layout names



42
43
44
45
46
# File 'app/models/alchemy/site/layout.rb', line 42

def page_layout_names(layoutpages: false)
  page_layout_definitions.select do |layout|
    !!layout.layoutpage && layoutpages || !layout.layoutpage && !layoutpages
  end.tap { _1.collect!(&:name) }
end