Class: Pwb::ComfyController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pwb::ComfyController
- Defined in:
- app/controllers/pwb/comfy_controller.rb
Overview
based on comfortable-mexican-sofa/app/controllers/comfy/cms/content_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
default_url_options, #set_locale, #set_theme_path
Instance Method Details
#render_sitemap ⇒ Object
55 56 57 |
# File 'app/controllers/pwb/comfy_controller.rb', line 55 def render_sitemap render end |
#show ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'app/controllers/pwb/comfy_controller.rb', line 24 def show @cms_pages = [] begin cms_page_container = Pwb::CmsPageContainer.find(params[:page_slug]) @title_key = cms_page_container.pageTitleKey cms_page_container.cmsPartsList.each do |cms_part| @cms_page = Comfy::Cms::Page.where({label: cms_part["label"], slug: I18n.locale}).first # @cms_site.pages.published.find_by_full_path!("/about-us/services") @cms_pages.push @cms_page if @cms_page end rescue ActiveHash::RecordNotFound end @content_area_cols = Content.where(tag: 'content-area-cols').order('sort_order') render "/pwb/sections/cms" # cms_page_path = "/#{params[:page_slug]}-page" # https://github.com/comfy/comfortable-mexican-sofa/wiki/View-rendering # below makes use of Comfy view rendering: # return render :cms_page => cms_page_path, :layout => "pwb/application", :cms_blocks => { # :jumbotron => 'Content About Events' # # :column_b => { :template => '/events/index' }, # # :column_c => { :partial => '/events/calendar' } # } # return render @cms_page.content_cache # , layout: "application" end |