Skip to content

Add documention note about variable scope of override blocks in {% embed ... only %}#4845

Open
andy-blum wants to merge 2 commits into
twigphp:3.xfrom
andy-blum:docs/embed-with-only
Open

Add documention note about variable scope of override blocks in {% embed ... only %}#4845
andy-blum wants to merge 2 commits into
twigphp:3.xfrom
andy-blum:docs/embed-with-only

Conversation

@andy-blum

Copy link
Copy Markdown

Closes #4844

Comment thread doc/tags/embed.rst
Comment on lines +181 to +182
{# "name" is undefined inside the block #}
{% embed "base" only %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{# "name" is undefined inside the block #}
{% embed "base" only %}
{% embed "base" only %}
{# "name" is undefined inside the block #}

Comment thread doc/tags/embed.rst
Comment on lines +186 to +187
{# "name" is passed explicitly and is available #}
{% embed "base" with {'name': name} only %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{# "name" is passed explicitly and is available #}
{% embed "base" with {'name': name} only %}
{% embed "base" with {'name': name} only %}
{# "name" is passed explicitly and is available #}

@e0ipso e0ipso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good clarifications. I suggested an über-nit pick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Document (and possibly improve) variable scope of override blocks in {% embed ... only %}

2 participants