FHIR Chat · Nested liquid variables · IG creation

Stream: IG creation

Topic: Nested liquid variables


view this post on Zulip Jose Costa Teixeira (Jul 23 2020 at 21:24):

Does anyone know how I can evaluate a liquid variable whose value is a liquid variable itself?
my data file contains
...
value1: "some text"
value2: "more text"
value3: "text with a variable {{id}}".

I want value 3 to be parsed as
"text with a variable structuredefinition-patient"
but I get only a literal
"text with a variable {{id}}"

view this post on Zulip Jose Costa Teixeira (Jul 23 2020 at 21:25):

something like this
http://acegik.net/blog/ruby/jekyll/plugins/howto-nest-liquid-template-variables-inside-yaml-front-matter-block.html
but ideally without making a filter (I have no idea where to put that filter in my template)

view this post on Zulip Eric Haas (Jul 23 2020 at 21:39):

do you want {{[id]}}?

view this post on Zulip Eric Haas (Jul 23 2020 at 21:49):

i've used {{[type]}} and {{[id]}} in front matter variables before.

like :


type: {{[type]}}
id: {{[id]}}


then referenced the type and id using page.id and page.type which is handy when you want to use the in the included files. There are limits to this with the current layouts however and we have avoided using page variables.

view this post on Zulip Jose Costa Teixeira (Jul 24 2020 at 14:32):

This doesn't work for me. Perhaps because I am using this inside a JavaScript block...


Last updated: Apr 12 2022 at 19:14 UTC