Sebb
with EEx.function_from_file I can create a function from an eex-template, call it and get a rendered string back.
How can I do that with ~H?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 16 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Sebb
its me again
Got heex 0.18 running with EEx.function_from_file.
Dont ask me whats going on, no idea, (and
tag_handleris also not yet documented) I copied the solution from here: Using EEx.eval_string with HEEx Engine on live_view 0.18.18 - #2 by chrismccordSebb
warning - not true, this is
leexengine.Cant get this to work with
heex-engine. UsingPhoenix.LiveView.HTMLEnginewill complain that it has noinit/1.So I now do
Phoenix.Template.compile_allwhich is a little odd if you want to get a function for exactly one file. But you can still do it:if you have this template:
/foo/bar/template.html.heexnote, that you can just give this to the engines arg:
Now you can read markdown into a template! Cool.
Sebb
If someone is coming here to do it the hard way (without
embed_templates, eg you need more control).This changed with LV 0.18, one now has to:
Sebb
Just when I think: “what a mess, someone should write a macro that automatically loads the templates!”
I just didn’t know about that. Very nice, thank you.
So the whole thing looks like:
LostKobrakai
Any reason not to use
embed_templates?Sebb
Yes it works. To summarize what to do to use LV 0.18-HTMLEngine as a template engine:
n0gg1n
I don’t really understand why this is necessary, but this should work:
Sebb
adding
caller: __ENV__leads to the next error:n0gg1n
maybe related to this issue
try
Sebb
This does not work with LV 0.18, any ideas what to do?