Swich to another live.html.leex

To my knowledge of liveview and the way they are rendered are has follow:

  • root.html.heex <— top level
    • live.html.leex <---- called if is a liveview file
      • here contents of any live_view render

Since we can change “root.html.heex” to another layout, can we change based on routing from live.html.leex or another.html.leex? Or is something “hardcoded” that needs to be ONLY “live.html.leex”

Basicly I want to switch the layout at the liveview layout level and not the root level.

One option is to remove the live.html.heex all together (my_app_web.ex under def live_view) and use components for your different layouts.

Or you can trim it down to the bare essentials and use layout components.

You can also change the root layout for a live session as per docs, and not use the live.html.heex