Module: QuicCms::PagesHelper

Defined in:
app/helpers/quic_cms/pages_helper.rb

Instance Method Summary collapse

Instance Method Details

#show_children(page) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/quic_cms/pages_helper.rb', line 3

def show_children(page)
  return_html = ""
  unless page.children.empty?
    return_html += "<ul>"
    for child in page.children
      return_html += "<li>" + link_to(h(child.title), "/#{child.permalink}")
      return_html += show_children(child)
      return_html += "</li>"
    end
    return_html += "</ul>"
  end
  return_html
end