Sha256: b2c8fc788c96dd5dbe92c8e4d4ebaf1b206b1d4c522601438569f50473cca89d

Contents?: true

Size: 435 Bytes

Versions: 3

Compression:

Stored size: 435 Bytes

Contents

class Cms::SitemapsController < Spud::ApplicationController
	respond_to :xml
	caches_page :show,:expires_in => 1.day
	def show
		@pages = SpudPage.published_pages.public.order(:spud_page_id)
		if Spud::Core.multisite_mode_enabled
			site_config = Spud::Core.site_config_for_host(request.host_with_port)
			@pages = @pages.site(!site_config.blank? ? site_config[:site_id] : 0)
		end
		@pages = @pages.all
		respond_with @pages
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_cms-1.0.3 app/controllers/cms/sitemaps_controller.rb
tb_cms-1.0.2 app/controllers/cms/sitemaps_controller.rb
tb_cms-1.0.1 app/controllers/cms/sitemaps_controller.rb