Method: Cms::MobileAware#determine_page_layout
- Defined in:
- lib/cms/mobile_aware.rb
#determine_page_layout ⇒ String
Looks for a mobile template if the request is mobile, falling back to the html template if it can’t be found.
10 11 12 13 14 15 16 |
# File 'lib/cms/mobile_aware.rb', line 10 def determine_page_layout if respond_as_mobile? mobile_exists = template_exists?(@page.layout_name, "layouts/mobile") return @page.layout(:mobile) if mobile_exists end @page.layout(:full) end |