Skip to content

Commit 52fa31c

Browse files
josevalimSteffenDE
authored andcommitted
More layout docs and info
1 parent d46ba5e commit 52fa31c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

guides/server/live-layouts.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
Your LvieView applications can be made of two layouts:
44

55
* the root layout - this is a layout used by both LiveView and
6-
regular views. This layout typically contains the `<html>`
6+
regular controller views. This layout typically contains the `<html>`
77
definition alongside the head and body tags. Any content defined
88
in the root layout will remain the same, even as you live navigate
99
across LiveViews. The root layout is typically declared on the
1010
router with `put_root_layout` and defined as "root.html.heex"
1111
in your layouts folder. It calls `{@inner_content}` to inject the
1212
content rendered by the layout
1313

14-
* the app layout - this is the default application layout which
15-
is rendered on both regular HTTP requests and LiveViews.
16-
It defaults to "app.html.heex". This layout is typically set
17-
on `use Phoenix.LiveView, layout: ...` but it has been discouraged
18-
in more recent Phoenix versions, in favor of using explicit function
19-
components as layouts.
14+
* the app layout - this is the dynamic layout part of your application,
15+
it often includes the menu, sidebar, flash messages, and more.
16+
From Phoenix v1.8, this layout is explicitly rendered in your templates
17+
by calling the `<Layouts.app />` component. In Phoenix v1.7 and earlier,
18+
the layout was typically configured as part of the `lib/my_app_web.ex`
19+
file, such as `use Phoenix.LiveView, layout: ...`
2020

2121
Overall, those layouts are found in `components/layouts` and are
2222
embedded within `MyAppWeb.Layouts`.

0 commit comments

Comments
 (0)