Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,

What would be the best way to have different <head> content for clonable pages to avoid duplicate schema across pages?

I have tried using various text area/filed options but the schema never displays correctly, it is always looking something like this in the source code

Code: Select all
&lt;script type=&quot;application/ld+json&quot;&gt;
    {
      &quot;@context&quot;: &quot;https://schema.org&quot;,
      &quot;@type&quot;: &quot;BreadcrumbList&quot;,
      &quot;itemListElement&quot;: [
        {
          &quot;@type&quot;: &quot;ListItem&quot;,
          &quot;position&quot;: 1,
          &quot;name&quot;: &quot;Home&quot;,


When it should look like this
Code: Select all
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",


Any ideas welcomed :)
Hi,

To stop Couch from mangling your code (which it does out of security concern), please try using a 'textarea' type editable region with its 'no_xss_check' param set to '1' as follows -
Code: Select all
<cms:editable name='schema' type='textarea' label='Schema' no_xss_check='1' />

Paste your schema into this textarea and it should get appear verbatim on the frontend.

Hope this helps.
Perfect KK, just what i was looking for
3 posts Page 1 of 1