najamsk
different root and app layout for public and admin site
Hello guys,
I am new to elixir and Phoenix I am trying to build a website with livewviews and along the way working and making sense to things.
I reach to stage where I want to build a small admin panel for my sqllite data tables. I want a different root layout and app layout for admin panel. So admin user will have admin pages that will have different style with live_view components. i dont want to use multiple if else statement to use same root and app layouts.
pipeline :admin do
plug :put_root_layout, html: {ChatclubWeb.LayoutsAdmin, :admin_root}
plug :put_layout, {ChatclubWeb.LayoutsAdmin, :admin_app}
end
This does change the root.html.heex to admin_root.html.heex but app layout is still not loading admin app layout.
Trying this for two days now.
First Post!
100phlecs
It looks like the html: for the :put_layout is missing
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








