File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -906,9 +906,11 @@ the component you're now rendering *and* you have access to all of that componen
906906 {{ this.someFunction }} {# this refers to SuccessAlert #}
907907
908908 {% component Alert with { type: 'success' } %}
909- {{ this.someFunction }} {# this refers to Alert! #}
909+ {% block content %}
910+ {{ this.someFunction }} {# this refers to Alert! #}
910911
911- {{ type }} {# references a "type" prop from Alert #}
912+ {{ type }} {# references a "type" prop from Alert #}
913+ {% endblock %}
912914 {% endcomponent %}
913915
914916 Conveniently, in addition to the variables from the ``Alert `` component, you still have
@@ -919,7 +921,9 @@ access to whatever variables are available in the original template:
919921 {# templates/SuccessAlert.html.twig #}
920922 {% set name = 'Fabien' %}
921923 {% component Alert with { type: 'success' } %}
922- Hello {{ name }}
924+ {% block content %}
925+ Hello {{ name }}
926+ {% endblock %}
923927 {% endcomponent %}
924928
925929 Note that ALL variables from upper components (e.g. ``SuccessAlert ``) are available to lower
You can’t perform that action at this time.
0 commit comments