Module: Cms::SitemapGenerator
- Extended by:
- MenuHelper, SitemapGenerator
- Included in:
- SitemapGenerator
- Defined in:
- lib/bcms_seo_sitemap/cms/sitemap_generator.rb
Instance Method Summary collapse
-
#depth ⇒ Object
If depth has never been set, it returns nil.
-
#depth=(new_depth) ⇒ Object
These setter and getter methods are probably not needed anymore.
- #items ⇒ Object
Instance Method Details
#depth ⇒ Object
If depth has never been set, it returns nil
25 26 27 |
# File 'lib/bcms_seo_sitemap/cms/sitemap_generator.rb', line 25 def depth configuration.depth || 0 end |
#depth=(new_depth) ⇒ Object
These setter and getter methods are probably not needed anymore. Access to Cms::Settings.bcms_seo_sitemap could be done directly from Cms::SitemapsController and that would probably be cleaner.
I’m keeping them here to keep the changes contained to this file only for now.
20 21 22 |
# File 'lib/bcms_seo_sitemap/cms/sitemap_generator.rb', line 20 def depth=(new_depth) configuration.depth = new_depth.to_i end |
#items ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/bcms_seo_sitemap/cms/sitemap_generator.rb', line 6 def items = {:page => Page.find_by_path('/'), :show_all_siblings => true} if configuration.depth && configuration.depth.nonzero? .merge!({:depth => configuration.depth}) end () end |