Class: Lcms::Engine::PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lcms/engine/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#not_foundObject

NOTE: Temporary disabled def leadership

@leadership_posts = LeadershipPost.all.order_by_name_with_precedence

end



21
22
23
# File 'app/controllers/lcms/engine/pages_controller.rb', line 21

def not_found
  render status: :not_found
end

#showObject



6
7
8
# File 'app/controllers/lcms/engine/pages_controller.rb', line 6

def show
  @page = Lcms::Engine::Page.find(params[:id])
end

#show_slugObject



10
11
12
13
14
# File 'app/controllers/lcms/engine/pages_controller.rb', line 10

def show_slug
  slug = params[:slug].to_s
  @page = Lcms::Engine::Page.find_by(slug: slug)
  render slug if template_exists?(slug, 'pages')
end