If I want to add the additionalProperty under the Thing type, what should I do?

Created on 15 August 2024, 3 months ago
Updated 27 August 2024, 3 months ago

I'd like to add the https://schema.org/additionalProperty under the https://schema.org/Thing type, what should I in the module schemadotorg?
It seems schemadotorg read CSV data under the folder data/27.0/schemaorg-current-https-types.csv and data/27.0/schemaorg-current-https-properties.csv. But when I just append ,https://schema.org/additionalProperty in the column properties against the line Thing in the schemaorg-current-https-types.csv file, it doesnot work at all.

Which hooks or services should I implement? Or which existing files can be started with?

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡¨πŸ‡³China fishfree

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @fishfree
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Your best approach is to use the schemadotorg_additional_mappings.module and apply https://schema.org/Product to all node mappings.

    The schemadotorg_additional_mappings.settings.yml config would like something like...

    default_additional_mappings:
      node--Thing:
        - Product
        - WebPage
    default_properties:
      Product:
        - additionalProperty
      WebPage:
        - dateCreated
        - dateModified
        - inLanguage
        - name
        - primaryImageOfPage
        - relatedLink
        - significantLink
    
  • πŸ‡¨πŸ‡³China fishfree

    @jrockowitz Thank you very much! According to you tip, I configured on page /admin/config/schemadotorg/settings/types as the screenshots below:

    You can see, I'd like to use custom_field as the field type of additionalProperty. However, when I create a schema.org content type as below, it's still the text(plain) field and I cannot change the type:

  • πŸ‡¨πŸ‡³China fishfree

    @jrockowitz Sorry to bother you. Would you pls have a look at the issue at #3?

Production build 0.71.5 2024