Hi All... I am using generate_sitemap plugin to generate sitemap. It goes very well and creates sitemap as well. My problem is I want some links that are coming from vender/plugins. Can any one tell me how to get those links??? Thanks all... -- Posted via http://www.ruby-forum.com/.
On Oct 13, 2009, at 6:54 AM, Smit Shah wrote:> > Hi All... > > I am using generate_sitemap plugin to generate sitemap. It goes very > well and creates sitemap as well. My problem is I want some links that > are coming from vender/plugins. Can any one tell me how to get those > links??? > > Thanks all... > --SitemapGenerator::Sitemap.add_links do |sitemap| sitemap.add the_plugin_path sitemap.add ''/some/manual/path'' end Have you tried something like that? -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
Thanks Rob, It gives me an error like /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443:in `load_missing_constant'': uninitialized constant SitemapGenerator (NameError) ,if I write this code in routes. So, where should I suppose to write this code?> SitemapGenerator::Sitemap.add_links do |sitemap| > sitemap.add the_plugin_path > sitemap.add ''/some/manual/path'' > end > > Have you tried something like that? > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org-- Posted via http://www.ruby-forum.com/.
You''d put this code (really just the additional "sitemap.add" lines) into your config/sitemap.rb file. Are you sure that you installed the plugin? The SitemapGenerator should be defined by the vendor/plugins/sitemap_generator/lib/ sitemap_generator.rb file which Rails will autoload as needed. -Rob On Oct 13, 2009, at 11:51 PM, Smit Shah wrote:> > Thanks Rob, > > It gives me an error like > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ > dependencies.rb:443:in > `load_missing_constant'': uninitialized constant SitemapGenerator > (NameError) > > ,if I write this code in routes. So, where should I suppose to write > this code? > > >> SitemapGenerator::Sitemap.add_links do |sitemap| >> sitemap.add the_plugin_path >> sitemap.add ''/some/manual/path'' >> end >> >> Have you tried something like that? >> >> -Rob >> >> Rob Biedenharn http://agileconsultingllc.com >> Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org > > -- > Posted via http://www.ruby-forum.com/. > > >Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org +1 513-295-4739 Skype: rob.biedenharn