Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Looking for a way to output a JSON that looks like this:
{ "@context": "http://schema.org", "@type": ["LocalBusiness","MedicalOrganization"], ...However, the current drop-down allows for only one selection. Is there a solution to this?
Thank you!
Comment | File | Size | Author |
---|---|---|---|
#14 | schema_metatag-add-additionaltype-2936298.patch | 1.71 KB | KarenS |
| |||
#11 | schema_metatag-add-additionaltype-2936298.patch | 6.49 KB | KarenS |
| |||
#9 | schema_metatag-add-additionaltype-2936298-9.patch | 6.5 KB | thejimbirch |
Comments
Comment #2
anandangalig CreditAttribution: anandangalig commentedComment #3
KarenS CreditAttribution: KarenS at Lullabot commentedI'm not even sure that would validate.
Comment #4
DamienMcKennaComment #5
ChristophWeber CreditAttribution: ChristophWeber at BIZX LLC commentedI ran a quick test in the Google Validator, it does in fact not validate as proposed.
What does validate is this:
which makes me think the pivoting feature in schema_metatag ought to work here.
Comment #6
KarenS CreditAttribution: KarenS at Lullabot commentedAlthough Google may accept multiple types, I'm not sure that's ideal. I see there is http://schema.org/additionalType which looks like what you would use instead. Note that the JSON LD example on that page looks like this:
Comment #7
ChristophWeber CreditAttribution: ChristophWeber at BIZX LLC commentedThe general guidance everywhere is to use the most specific type, and everything I've ever read used singular. Unless someone can point to "official" contrary documentation, I suggest we refocus this issue around support for additionalType, or else Close (won't fix) it.
Comment #8
KarenS CreditAttribution: KarenS at Lullabot commentedComment #9
thejimbirch CreditAttribution: thejimbirch as a volunteer commentedThat attached patch adds the additionalType field to the Schema.org Organization module.
Comment #11
KarenS CreditAttribution: KarenS at Lullabot commentedRerolled.
Comment #13
KarenS CreditAttribution: KarenS at Lullabot commentedCommitted. Now needs to be back-ported to D7.
Comment #14
KarenS CreditAttribution: KarenS at Lullabot commentedComment #16
KarenS CreditAttribution: KarenS at Lullabot commentedAdded to both D7 and D8. Thanks!
Comment #18
temujinWest CreditAttribution: temujinWest as a volunteer commentedHi, I'm looking to add productontology to product as additionalType, any chance to patch this for product?
Comment #19
thejimbirch CreditAttribution: thejimbirch as a volunteer commented@18temujinWest . This issue has been closed. It would be best to open a new issue for your feature request.