Hi everyone,
I'm trying to add a rich snippet schema directly in the header for Google, but I'm running into an issue. My script needs to be populated with backend data, but when I pass the data, it ends up being empty.
Any suggestions on how to resolve this?
<template data-sly-template.richschema="${ @ objectWithProperties }">
<script type="application/ld+json">
{
"@type": "SearchResultsPage",
"name": "${objectWithProperties.title}",
"description": "${objectWithProperties.description}",
"url": "${objectWithProperties.url}"
}
</script>
</template>