Skip to content

GenericCollection jsonldtype not being applied #18

@scottblackburn

Description

@scottblackburn

When using a GenericCollection the jsonldtype doesn't seem to get applied. In my example i'm trying to add a collection of HowTo steps like this:

<GenericCollection type="step" jsonldtype="HowToStep">
    <Generic type="itemListElement" jsonldtype="HowToDirection" schema={{ name: attributes.schemaObject.steps[0].attributes.title, text: attributes.schemaObject.steps[0].attributes.content }} />
    <Generic type="itemListElement" jsonldtype="HowToDirection" schema={{ name: attributes.schemaObject.steps[1].attributes.title, text: attributes.schemaObject.steps[1].attributes.content }} />
    <Generic type="itemListElement" jsonldtype="HowToDirection" schema={{ name: attributes.schemaObject.steps[2].attributes.title, text: attributes.schemaObject.steps[2].attributes.content }} />
</GenericCollection>

But the generated schema is missing the 'HowToStep` type on the step:

{"@context":"https://schema.org/","@type":"HowTo","name":"retgretg","step":[[{"itemListElement":{"@type":"HowToDirection","name":"ertgretg","text":"ertretg tgrtg"}},{"itemListElement":{"@type":"HowToDirection","name":"ertgretg","text":"ertgrtg"}},{"itemListElement":{"@type":"HowToDirection","name":"ertgrtg","text":"ertgretgertgertgretg tyhtyh"}}]]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions