Class: Spud::Cms::SitemapsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/spud/cms/sitemaps_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
# File 'app/controllers/spud/cms/sitemaps_controller.rb', line 3

def show
	@pages = SpudPage.published_pages.is_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
	respond_with @pages
end