diff --git a/src/AdvancedListingBlockTemplate.jsx b/src/AdvancedListingBlockTemplate.jsx
index c44b6e0..b7b0b80 100644
--- a/src/AdvancedListingBlockTemplate.jsx
+++ b/src/AdvancedListingBlockTemplate.jsx
@@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import { ConditionalLink } from '@plone/volto/components';
import { flattenToAppURL } from '@plone/volto/helpers';
-import config from '@plone/volto/registry';
import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
import { isInternalURL } from '@plone/volto/helpers/Url/Url';
@@ -33,7 +32,6 @@ const AdvancedListingBlockTemplate = ({
link = {linkTitle || href};
}
- const { settings } = config;
const hasImage = imageSide !== null;
const oneColumnElement = ['up', 'down', null].includes(imageSide);
const columnSize = oneColumnElement ? 1 : 2;
@@ -41,8 +39,8 @@ const AdvancedListingBlockTemplate = ({
const contentGridWidth = oneColumnElement
? 12
: hasImage
- ? 12 - imageWidth
- : 12;
+ ? 12 - imageWidth
+ : 12;
const intl = useIntl();
moment.locale(intl.locale);
return (
@@ -54,18 +52,17 @@ const AdvancedListingBlockTemplate = ({
{['up', 'left'].includes(imageSide) && (
- {!item[settings.listingPreviewImageField] && (
+ {!item.image_field && (
)}
- {item[settings.listingPreviewImageField] && (
+ {item.image_field && (
{['right', 'down'].includes(imageSide) && (
- {!item[settings.listingPreviewImageField] && (
+ {!item.image_field && (
)}
- {item[settings.listingPreviewImageField] && (
+ {item.image_field && (
{
title: 'Advanced',
template: AdvancedListingBlockTemplate,
schemaEnhancer: advancedSchema,
- fullobjects: true,
},
];
return config;