Passing data between Nunjucks components #3240
Unanswered
rawriddims
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
/component.njk
retrieves the{{ item.url }}
from each article.I want to pass the
{{ item.url }}
, retrieved by/component.njk,
to/index.njk
.This approach injects the
{{ item.url }}
variable from/component.njk
directly into the href attribute of the tag within/index.njk
. However, this variable doesn't exist in the context of/index.njk
.How can I solve this?
Beta Was this translation helpful? Give feedback.
All reactions