Open
Description
I'm having issues with dynamically including a template in a multisite setup.
Take the following example, which is being used in a for block in blocks
loop:
{% dynamicInclude "_blocks/productList.twig" with {block: block} only placeholder %}
{% include "_partials/product-list-skeleton.twig" %}
{% endDynamicInclude %}
In the primary site, everything works great. In my second site, however, my block
variable is missing from the context. The ?p=actions/servd-asset-storage/dynamic-content/get-content
request comes back with the following Twig runtime error:
Impossible to access an attribute ("headline") on a null variable.
And that's because within my productList.twig
template, I'm calling block.headline
.
While investigating the issue, I tried replacing the dynamic include with a default include, and everything worked fine on my second site.
Versions
- Plugin 3.2.8
- Craft 4.3.10
Metadata
Metadata
Assignees
Labels
No labels