diff --git a/src/blocks/Listing/schema.js b/src/blocks/Listing/schema.js index 3809ec2f..385f7c0d 100644 --- a/src/blocks/Listing/schema.js +++ b/src/blocks/Listing/schema.js @@ -96,6 +96,7 @@ export const setCardModelSchema = (args) => { const itemModelSchema = schema.properties.itemModel.schema; itemModelSchema.fieldsets[0].fields = [ ...itemModelSchema.fieldsets[0].fields, + 'hasLink', 'maxTitle', 'hasDate', 'hasDescription', @@ -107,6 +108,11 @@ export const setCardModelSchema = (args) => { ]; itemModelSchema.properties = { ...itemModelSchema.properties, + hasLink: { + title: 'Enable link', + description: 'Link to source content', + type: 'boolean', + }, hasDate: { title: 'Publication date', type: 'boolean', diff --git a/src/components/UniversalCard/fragments/CardImage.jsx b/src/components/UniversalCard/fragments/CardImage.jsx index 0f47c255..2e58aaee 100644 --- a/src/components/UniversalCard/fragments/CardImage.jsx +++ b/src/components/UniversalCard/fragments/CardImage.jsx @@ -18,11 +18,15 @@ const getLabel = (props) => { }; const CardImage = (props) => { - const { item, isEditMode, preview_image } = props; + const { item, isEditMode, preview_image, itemModel } = props; const label = getLabel(props); return ( - + {!isEditMode ? ( { - const { item, isEditMode } = props; + const { item, isEditMode, itemModel } = props; const { title, Title } = item; const t = title || Title; @@ -12,7 +12,7 @@ const CardTitle = (props) => { {t}