This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi,
following the example from https://octobercms.com/docs/cms/components#external-property-values I'm trying to pass a variable to a component in an array that gets passed to a partial and it does not seem to accept it. See example below.
Partial gets passed an array:
{% partial 'page-blocks/'~block._group block=block %}
The block.property
includes information that I want to pass to a component in the partial.
[recordDetail]
recordSlug = "{{ block.property }}"
This does not work. But it does render in TWIG if called {{ block.property }}
. Then if I add a new variable to the partial code:
{% partial 'page-blocks/'~block._group block=block property=block.property %}
and call it in the component
recordSlug = "{{ property }}"
it works.
Anybody got an idea why? Or am I doing sth wrong?
If I were to wish to send more property values to a component, I would need to manually add each property as a new passing value... which just does not seem practial. Especially if working with 10+ different partials... Right?
Thanks.
1-1 of 1