- Issue created by @pakmanlh
Using SDC there is a problem when a component extends from another and wants to use the componentMetadata object in order to, for instance, use the Component path information to load some images from the component's folder.
As the sdc_examples module shows here, the problem comes when a component uses the extend inside their template expecting the files from that component to be loaded but instead the ones coming from the extended component end up showing.
I guess the componentMetadata object should get the right context depending the component which ends up being loaded.
As a workaround a twig block can be used from the extended component in order to apply the right componentMetadata information as the following example shows:
{% set metadata = componentMetadata %}
{% embed 'sdc_example:my-button--primary' %}
{% block iconTypeBlock %}
{{ source(metadata.path ~ '/img/' ~ iconType|default('power') ~ '.svg') }}
{% endblock %}
{% endembed %}
Active
11.0 π₯
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.