# layout updating when using push\_navigate

**URL:** <https://forum.elixirforum.com/t/layout-updating-when-using-push-navigate/59049>\
**Category:** Questions\
**Tags:** phoenix, liveview, push\_navigate\
**Created:** [October 17, 2023, 4:37pm UTC](https://forum.elixirforum.com/t/layout-updating-when-using-push-navigate/59049 "2023-10-17T16:37:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![codeanpeace](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/codeanpeace/32/10278_2.png) [@codeanpeace](https://forum.elixirforum.com/u/codeanpeace)\
**Post date:** [October 17, 2023, 7:47pm UTC](https://forum.elixirforum.com/t/layout-updating-when-using-push-navigate/59049/4 "2023-10-17T19:47:58Z")

</div>

Have you tried creating a separate root layout specific to that live session? You should be able to do something like this:

```elixir
live_session :provider,
      root_layout: {ProviderWeb.Layouts, :provider_root},

```

If you wanted to keep a single root layout, you could move the shared unchanging parts of the `:layout` into the `:root_layout` and put it behind a check based on the `live_session` by checking an assign set on `mount` or `on_mount` for the name of the `live_session`, which should be available somewhere in the `session` callback parameter.

---

_[View the full topic](https://forum.elixirforum.com/t/layout-updating-when-using-push-navigate/59049)._
