0

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?

ijt
  • 3,505
  • 1
  • 29
  • 40

2 Answers2

0

Just to follow this up it's worth noting for the next person; :put_root_layout plug in the :browser pipeline in router.ex can end up causing two layouts (live view and a root layout).

I wanted these to be different so I've added a :browser pipeline without the :put_root_layout and another :layout pipeline with just that.

So I have :browser and :browser_with_layout which extends it.

pip
  • 453
  • 2
  • 13
-1

As a first idea you can just change it if it's not affecting to other pages)

But seriously, you can use put_layout from Phoenix in your controller. Try that:

https://hexdocs.pm/phoenix/Phoenix.Controller.html#put_layout/2

Sabit Rakhim
  • 460
  • 3
  • 12