Hello people!
I was wondering if there’s some way to use variables in JSON Schema data.
Tried this, which doesn’t work:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "<?= $page->name() ?>",
"image": "<?= $page->image()->toFile->url() ?>",
"description": "<?= $page->desc() ?>",
// more...
}
}
</script>
I have some product review pages where I want to insert this into the template.
Thanks in advance