2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/sitemap_controller.rb', line 2
def index
@public_dir = root_url
@products = Product.active.find(:all)
@taxonomies = Taxonomy.all
@pages = _select_static_pages
respond_to do |format|
format.html { }
format.xml do
nav = _build_taxon_hash
nav = _build_pages_hash nav
nav = _add_products_to_tax nav, false
render :layout => false, :xml => _build_xml(nav, @public_dir)
end
format.text do
@nav = _add_products_to_tax(_build_taxon_hash, false)
render :layout => false
end
end
end
|