File tree Expand file tree Collapse file tree
src/app/core/metadata/schema-json-ld/schema-types/product Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ import { schemaJsonLDForEntity } from '../schema-type-decorator';
66export class ProductCreativeWorkSchemaType extends SchemaType {
77
88 protected createSchema ( item : Item ) : Record < string , any > {
9+
10+ let description : string ;
11+ if ( ! SchemaType . getMetadataValue ( item , 'dc.description' ) ) {
12+ description = SchemaType . getMetadataValue ( item , 'dc.description.abstract' ) ;
13+ } else {
14+ description = SchemaType . getMetadataValue ( item , 'dc.description' ) ;
15+ }
16+
917 return {
1018 '@context' : 'https://schema.org' ,
1119 '@type' : 'CreativeWork' ,
@@ -18,6 +26,7 @@ export class ProductCreativeWorkSchemaType extends SchemaType {
1826 'inLanguage' : SchemaType . getMetadataValue ( item , 'dc.language.iso' ) ,
1927 'genre' : SchemaType . getMetadataValue ( item , 'dc.subject' ) ,
2028 'abstract' : SchemaType . getMetadataValue ( item , 'dc.description.abstract' ) ,
29+ 'description' : description ,
2130 'funding' : SchemaType . getMetadataValue ( item , 'dc.relation.funding' ) ,
2231 'sponsor' : SchemaType . getMetadataValue ( item , 'dc.description.sponsorship' )
2332 } ;
You can’t perform that action at this time.
0 commit comments