theshank

theshank

Is there any inbuilt functionality for providing template inheritance for eex templates?

Is there any inbuilt functionality for providing template inheritance for eex templates, something like jinja2 has (in the Python world).

PS: this is my first web application in elixir and I am trying to build it without phoenix.

Most Liked

theshank

theshank

To those who come to this topic, please check out the last portion of this blog post. You can build a solution on those lines.

Thank you @NobbZ for the help.

amarandon

amarandon

I’m interested in this but is it up-to-date? I couldn’t compile it:

warning: variable "assigns" does not exist and is being expanded to "assigns()", please use parentheses to remove the ambiguity or change the variable name                                                        
  vlans.conf.eex:1                                                                                                                                                                                                 
                                                                                                                                                                                                                   
** (CompileError) vlans.conf.eex:2: expected "assigns" to expand to an existing variable or be part of a match                                                                                                     
    (elixir) expanding macro: Kernel.var!/1
    vlans.conf.eex:2: Render.vlans/1
    (elixir) expanding macro: Kernel.<>/2
    vlans.conf.eex:8: Render.vlans/1
    (elixir) expanding macro: Kernel.<>/2
    vlans.conf.eex:8: Render.vlans/1
    (elixir) expanding macro: Kernel.if/2
    vlans.conf.eex:1: Render.vlans/1
theshank

theshank

@amarandon sorry I didnt log into elixirforum for quite some time… Are you still facing this issue?

Where Next?

Popular in Questions Top

fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement