Methods
L
M
N
Instance Public methods

Example:

link_to_page 123, class: "btn" do |page|
  "hello #{page.title}"
end
meta_and_title(page)

Example: head

= meta_and_title(current_page)
# File app/helpers/cardboard/public_helper.rb, line 20
def meta_and_title(page)
  return nil unless page
  seo = page.meta_seo.dup
  html = ""
  html += "<title>#{seo.delete(:title)}</title>" if seo[:title]
  seo.each do |key, value|
    html += "<meta name='#{key}' content='#{value}' />\n"
  end
  html.html_safe
end
nested_pages(page = nil, &block)

Example 1:

#nested_pages Cardboard::Page.arrange do |page, subpages|

.indent
  = link_to(page.title, page.url) if page.in_menu?
  = subpages

end Example 2: %ul

= nested_pages do |page, subpages|
  %i
    = link_to page.title, edit_page_path(page)
    = content_tag(:ul, subpages) if subpages.present?
# File app/helpers/cardboard/public_helper.rb, line 43
def nested_pages(page = nil, &block)
  raise ArgumentError, "Missing block" unless block_given?
  inner_nested_pages(Cardboard::Page.arrange(page), &block).html_safe
end