I need to set the page layout, currently, I can see that the used page layout file is application.html.haml
how would I let the page use another file as the layout?
I thought it would be possible by using page_layouts.yml
by setting the name
but it seems I still missing how to do it. What does that name
relates to? for now, its value is index
but where is that index file?
Any idea?
EDIT
I could handle this but only worked at show page as:
class ApplicationController < ActionController::Base
layout :determine_layout
def determine_layout
module_name = self.class.to_s.split("::").first
return (module_name.eql?("Alchemy") ? "pages" : "application")
end
However, I still need to apply this while editing the page at admin page.