Live_render inside regular template sends both app and live layout


with latest liveview 0.15.4 when I live_render from a regular template, I get both the app layout and the live layout superposed

aren’t we supposed to get the live layout only for live routes ?

To be clear you have app layout render twice? once because you are in a regular page, and a second time when rendering with live_render?

<APP Layout>
  <!-- live render -->
  <APP Layout>
  <LIVE Layout>content</LIVE Layout>
  </APP Layout>
  <!-- end live render -->
</APP Layout>

I render the live view from within a template new.html.eex from regular http request
with live_render inside the new.html.eex template

so I have the root and app layout which is normal, but I also have the live layout rendered on top of the live_render block which is surprising since it is supposed to be used only for live routes

I does not render for live routes, it seems to wrap LiveViews . It just so happens that you use a LiveView for a live route so it may look that way. But I suspect if you live_render a LiveView inside another LiveView, you will render live.html.leex twice.

I don’t know your situation, but if you must keep the page normal and just render the LiveView in there, maybe you can define a new blank layout template (ex: just wrap it in a div), and use that when defining the LiveView.

that is what I did, let the live layout almost blank
maybe that was in old versions of liveview that the live layout was there only for live routes
thank you anyway