ariandanim
How to set up subfolder in MyApplib?
Dear all,
I try to figured out does Phoenix support subfolder → subfolder in folder lib such as :
lib
→ myapp_web
→ controller
→ subfolder (for controller and html.ex)
→ page_controller.ex
→ page_html.ex
→ subfolder (for html)
→ home.html.heex
I try this but showing error message, perhaps someone could help the right way. Tks
Marked As Solved
ariandanim
it’s solved,
my fault, just revise code in product_html.ex in :
embed_templates “../../frontend/product_html/*”
Also Liked
LostKobrakai
You want to post that here as well.
Generally elixir and phoenix do not care how you organize your files, but in phoenix certain features mostly around templates need to require knowledge around where related files are stored. Those might require change in configuration when you move them around.
hauleth
I am pretty sure, that embed_templates do not find your frontend directory (because how it would guess where to look). It either needs to be sibling directory of blog_html.ex or you need to specify full relative path (aka ../frontend).
hauleth
Last Post!
ariandanim
Tks Brother @sodapopcan the code you share i put additional like this
embed_templates “…/…/frontend/product_html/*”
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










