Module: SitemapsHelper
- Defined in:
- app/helpers/sitemaps_helper.rb
Instance Method Summary (collapse)
-
- (Object) create_sitemap(levels = 6)
Returns the HTML for the sitemap (an unsorted list with clickable node titles) up to a specified number of sublist levels.
Instance Method Details
- (Object) create_sitemap(levels = 6)
Returns the HTML for the sitemap (an unsorted list with clickable node titles) up to a specified number of sublist levels.
5 6 7 8 9 10 11 12 |
# File 'app/helpers/sitemaps_helper.rb', line 5 def create_sitemap(levels = 6) items = current_site.accessible_content_children(:for_menu => true, :order => :position) unless items.empty? content_tag(:ul, items.map { |item| create_subitem(item, levels) }.join("\n"), :id => 'sitemap', :class => 'clearfix') else ' ' # No menu if no first level items end end |