- πΊπΈUnited States jrockowitz Brooklyn, NY
You can "Allow multiple mappings to point to the same Schema.org type" via the mapping type
@see /admin/config/search/schemadotorg/types/node
Hello :)
the option is checked but if I write
content_type_machine_name|Article
content_type_machine_name|NewsArticleand I save, the first is erased and keep the last content_type_machine_name|NewsArticle
- πΊπΈUnited States jrockowitz Brooklyn, NY
You can't map the same content type to different Schemas. It is a one-to-one relationship.
I did add the ability to add custom JSON-LD via the 'Schema.org Blueprints JSON-LD Custom' module, which would allow adding another Schema mapping to a content type.
Ok I see. I've tested but that add custom field into a "publisher" object
<script type="application/ld+json">{ "@context": "https:\/\/schema.org", "@type": "Article", "@url": "customURL", "identifier": [ { "@type": "PropertyValue", "propertyID": "uuid", "value": "1f3aab66-d260-4805-ae51-ebac38fc780a" } ], "inLanguage": "fr", "name": "customName", "copyrightHolder": "test", "copyrightYear": 2023, "dateCreated": "2022-11-14 15:16:50 +01:00", "dateModified": "2022-11-14 15:42:05 +01:00", "publisher": { "@context": "https:\/\/schema.org", "@type": "Organization", "name": "customName", "url": "customUrl", "test": "helloWorld" } }</script>
I need to have 2 scripts like that
<script type="application/ld+json">{ "@context": "https:\/\/schema.org", "@type": "Article", "@url": "customURL", "identifier": [ { "@type": "PropertyValue", "propertyID": "uuid", "value": "1f3aab66-d260-4805-ae51-ebac38fc780a" } ], "inLanguage": "fr", "name": "customName", "copyrightHolder": "test", "copyrightYear": 2023, "dateCreated": "2022-11-14 15:16:50 +01:00", "dateModified": "2022-11-14 15:42:05 +01:00" } }</script> <script type="application/ld+json">{ "@context": "https:\/\/schema.org", "@type": "NewsArticle", "@url": "customURL" }</script>
One script for @type Article and an other script for @type NewsArticle with other field
- πΊπΈUnited States jrockowitz Brooklyn, NY
You would have to write custom code to do the other mapping.