I needed an automated sitemap process for the www.cadechristian.com website and here is what I managed to create…route.rb: map.sitemap ‘sitemap.xml’, :controller => ‘sitemap’, :action => ‘sitemap’ robots.txt: Sitemap: http://www.cadechristian.com/sitemap.xml sitemap controller: def sitemap @model1 = Page.find(:all) @model2 = Page.find(:all)render :layout => falseend /app/view/sitemap/sitemap.builder: @home_url = ‘http://www.cadechristian.com’ xml.instruct!xml.urlset mlns => ‘http://www.sitemaps.org/schemas/sitemap/0.9′ do # Add static Urls [...]
Recent Comments