Skip to content

PhoenixKit 1.7.174: The host layout is applied once

PhoenixKit 1.7.174 fixes sites that set their own layout with config :phoenix_kit, layout:: PhoenixKit pages showed that layout’s header, navigation and footer twice.

The layout was applied once by Phoenix and once more by PhoenixKit’s own wrapper. It is now applied only by the wrapper. A layout written in the Phoenix 1.8 style, with render_slot(@inner_block), also works now; before, it crashed because Phoenix passes only @inner_content. A layout set up wrongly falls back to PhoenixKit’s own layout instead of an error on every page.

If your layout has a workaround for the double header, you can remove it.

Full release notes: PhoenixKit 1.7.174

1.7.174 · 5 July 2026

Fixed

  • Host layouts are no longer double-wrapped, and both {@inner_content} and render_slot(@inner_block) work. PhoenixKit LiveViews used to set their native Phoenix :layout to the host’s configured config :phoenix_kit, layout: — but every page also applies that same host layout itself via LayoutWrapper.app_layout in its render. So a host layout with visible chrome rendered twice (doubled header / nav / footer, body singular), and a host layout written in the Phoenix 1.8 idiom (slot :inner_block + render_slot(@inner_block)) crashed with KeyError: key :inner_block not found because Phoenix invokes a :layout with @inner_content only.

    The native :layout is now a pure passthrough (PhoenixKitWeb.Layouts.app, which renders only {@inner_content}), making app_layout the single owner of the host layout — applied exactly once. app_layout hands the host layout both a real inner_block slot and a lazily-derived @inner_content, so a host layout renders correctly whether it uses {@inner_content} (the documented contract) or render_slot(@inner_block). A misconfigured layout function falls back to PhoenixKit’s own layout instead of 500-ing every page.

    Hosts that previously worked around the double-wrap (e.g. detecting slot vs. @inner_content in their own layout) can drop that workaround.


PhoenixKit 1.7.174. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.