{% if _component %}{% block componentinfo %}
name: Foo
...
{%endblock %}{% endif %}
The rest of the template.
This metadata will cause parse errors if the template inherits from another template (Node "1" does not exist for Node "Twig_Node"). Because of this, I don't think we are going to be able to use inline blocks to contain that Twig metadata. Instead, we could parse the metadata out of a special comment, eg:
{# @Component
name: Foo
...
#}
The rest of the template.
I actually like this solution better anyway, since it will be completely ignored when the template is rendered outside of Mannequin.
This is a high priority fix because it affects our primary use case (Drupal), and will be a fairly common occurrence. I'm not sure how we got through the initial release without finding this.
Twig metadata that is kept in blocks, eg:
This metadata will cause parse errors if the template inherits from another template (Node "1" does not exist for Node "Twig_Node"). Because of this, I don't think we are going to be able to use inline blocks to contain that Twig metadata. Instead, we could parse the metadata out of a special comment, eg:
I actually like this solution better anyway, since it will be completely ignored when the template is rendered outside of Mannequin.
This is a high priority fix because it affects our primary use case (Drupal), and will be a fairly common occurrence. I'm not sure how we got through the initial release without finding this.