Hello!
I am attempting to inject values into a component shortcode, but I’m not having any luck in being able to have those values be populated within the component itself.
$parameters = wp_json_encode([
'Icon' => $banner['icon'],
'Headline' => $banner['headline'],
'Description' => $banner['description'],
'CTA Button Text' => $banner['cta_button_text'],
'CTA Button Icon' => $banner['cta_button_icon'],
'CTA Button URL' => $banner['cta_button_url']
]);
echo do_shortcode("[cs_component id='PEXTzcB9TSOxPh6ejb' parameters='".$parameters."']");
In my component, I would then expect to be able to reference the keys of those parameters as dynamic values:
{{dc:param:Icon}}
{{dc:param:Headline}}
{{dc:param:Description}}
{{dc:param:CTA Button Text}}
In the documentation it has the following example use:
<!-- This example is for a component with a parameter called "text" -->
<!-- From a parameter JSON -->
[cs_component id="..." parameters='{ "text": "This is parameter data" }']