module Maglev::StandaloneSectionsConcern

def fetch_maglev_dummy_page

def fetch_maglev_dummy_page
  @fetch_maglev_page = ::Maglev::Page.new(title: 'DummyPage', sections: fetch_maglev_site.sections)
end

def fetch_maglev_site_scoped_sections

def fetch_maglev_site_scoped_sections
  return if within_maglev_engine?
  fetch_maglev_site
  fetch_maglev_theme
  fetch_maglev_dummy_page
  fetch_maglev_page_sections
end

def maglev_rendering_mode

def maglev_rendering_mode
  params[:rendering_mode] || super
end

def within_maglev_engine?

def within_maglev_engine?
  controller_path.starts_with?('maglev/')
end