module Spud::Cms::ApplicationHelper def sp_list_pages(options = {}) pages = SpudPage.public.published_pages if Spud::Core.multisite_mode_enabled site_config = Spud::Core.site_config_for_host(request.host_with_port) pages = pages.site(site_config[:site_id]) if !site_config.blank? end start_page = nil max_depth = 0 active_class = "menu-active" if !options.blank? if options.has_key?(:exclude) pages = pages.where(["name NOT IN (?)",options[:exclude]]) end if options.has_key?(:start_page_id) start_page = options[:start_page_id] end if options.has_key?(:id) content = "