Skip to content
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

[Doc] Revert some wrong changes in Twig Component docs #2437

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/TwigComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,6 @@ You can even give the block default content. See
:ref:`Passing HTML to Components via Block <embedded-components>`
for more info.

The only limitation when defining contents inside a component using the HTML syntax
is that you cannot import macros using the ``_self`` keyword. You must always use
the full template path:

.. code-block:: html+twig

<twig:Alert>
{# ❌ this won't work #}
{% from _self import message_formatter %}
{# ✅ this works as expected #}
{% from 'some/path/template.html.twig' import message_formatter %}

{{ message_formatter('...') }}
</twig:Alert>

Fetching Services
-----------------

Expand Down
Loading