2021年3月2日星期二

How can I use only the root layout from a live view template in Phoenix?

Mainly I want to get rid of the

<main role="main" class="container">  

tag surrounding the rest of the page. That's defined in live.html.leex so I thought I could exclude it by putting this line into router.ex:

    live "/watch/:guest_id", WatchLive, layout: {MyAppWeb.LayoutView, :root}  

It's still there though. How can I exclude live.html.leex?

https://stackoverflow.com/questions/66450658/how-can-i-use-only-the-root-layout-from-a-live-view-template-in-phoenix March 03, 2021 at 12:08PM

没有评论:

发表评论