class FrontController < ApplicationController layout false def show_breadcrumb @ancestors = Page.find(params[:id]).ancestors_and_self @ancestors = nil if @ancestors.size == 1 end def show_banner @ad_banner = AdBanner.find(params[:id]) rescue nil end def show_footer render :text => @site.footer end def show_menu page = Page.find(params[:id]) rescue nil render :text => menu_level(Page.root, page, 1, page.design.layout.menu) if page end def show_site_sub_menu render :text => @site.sub_menu end def show_sitemap @items = get_homepage.children.excludes(sitemap_enabled: false) rescue [] end def show_page_sub_menu @menu_page = Page.find(params[:menu_page_id]) rescue nil @page_id = params[:page_id] end def show_inner_ad_image @ad_image = AdImage.find(params[:id]) rescue nil @ad_images = AdImage.all end private def menu_level(page, current_page, current, menu) res = '' if page.visible_children.size > 0 res << "" end res end def menu_li(page, current_page, current, menu, i) res = "" end end