Skip to content

Extra context in include tags is overridden by stub data #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thibaudcolas opened this issue Feb 19, 2020 · 1 comment
Closed

Extra context in include tags is overridden by stub data #9

thibaudcolas opened this issue Feb 19, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@thibaudcolas
Copy link
Member

In GitLab by @bcdickinson on Dec 18, 2017, 11:08

As of 0.1.3, extra context passed to include tags is overridden by stub data from YAML files. The desired behaviour is for context from outer scopes to take priority over inner scopes, so this is wrong. Example of incorrect behaviour below:

myparenttemplate.html:

{% include 'mytemplate.html' with extra="from include tag" %}

mytemplate.html:

{{ extra }}

mytemplate.yaml:

context:
  extra: "from YAML file"

Rendered output of myparenttemplate.html:

from YAML file
@thibaudcolas
Copy link
Member Author

thibaudcolas commented Feb 19, 2020

In GitLab by @m1kola on Dec 19, 2017, 16:08

Fixed in #35

@thibaudcolas thibaudcolas added the bug Something isn't working label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants