Changeset 1326
- Timestamp:
- 08/07/08 20:30:36 (4 months ago)
- Files:
-
- trunk/app/helpers/application_helper.rb (modified) (1 diff)
- trunk/app/views/sitemaps/show.rxml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/helpers/application_helper.rb
r1220 r1326 41 41 :host => show_hostname(content.episode.show), 42 42 :episode_slug => content.episode.slug, :content_slug => content.slug })) 43 end 44 45 def url_for_show_tag(show, tag, options = {}) 46 url_for(options.merge({ :controller => "public", :action => "tags", 47 :host => show_hostname(show), :search => tag.name})) 43 48 end 44 49 trunk/app/views/sitemaps/show.rxml
r1314 r1326 4 4 xml.tag! 'loc', url_for_show(@show, :only_path => false) 5 5 xml.tag! 'lastmod', @show.last_update_at.strftime("%Y-%m-%d") 6 xml.tag! 'changefreq', ' monthly'6 xml.tag! 'changefreq', 'weekly' 7 7 xml.tag! 'priority', '1' 8 8 end … … 12 12 xml.tag! 'loc', url_for_episode(episode, :only_path => false) 13 13 xml.tag! 'lastmod', episode.updated_at.strftime("%Y-%m-%d") 14 xml.tag! 'changefreq', ' monthly'14 xml.tag! 'changefreq', 'weekly' 15 15 xml.tag! 'priority', '0.5' 16 16 end 17 17 end 18 19 for tag in @show.episodes.collect(&:tags).flatten.uniq do 20 xml.tag! 'url' do 21 xml.tag! 'loc', url_for_show_tag(@show, tag, :only_path => false) 22 last_episode = tag.taggings.collect(&:taggable).sort_by(&:updated_at).last 23 xml.tag! 'lastmod', last_episode.updated_at.strftime("%Y-%m-%d") 24 xml.tag! 'changefreq', 'weekly' 25 xml.tag! 'priority', '0.3' 26 end 27 end 18 28 end
