{title && (
@@ -305,6 +254,8 @@ const SliderTemplate = ({
);
diff --git a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx
index 06d5c319a..258221c5e 100644
--- a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx
+++ b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx
@@ -16,6 +16,13 @@ const messages = defineMessages({
defaultMessage: 'Blocco sconosciuto',
},
});
+const Wrapper = ({ block, id, children }) => {
+ return block['@type'] === 'listing' && block.variation === 'slider' ? (
+ {children}
+ ) : (
+ <>{children}>
+ );
+};
/**
* RenderBlocks view component class.
* @function RenderBlocks
@@ -54,15 +61,21 @@ const RenderBlocks = ({
{map(items, (block) => {
const blockType = blockContent[blocksFieldname]?.[block]?.['@type'];
const Block = config.blocks.blocksConfig[blockType]?.['view'] || null;
+
if (Block != null) {
return (
-
+
+
+
);
} else {
return (
diff --git a/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx b/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx
index ea9dd328c..c6b86975d 100644
--- a/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx
+++ b/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx
@@ -5,6 +5,7 @@ CUSTOMIZATIONS:
- 'background class' and 'block class'
- 'background class' and 'block class' logic for search block
- search block integration
+- pass 'block' prop to listing variation
*/
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
@@ -37,7 +38,9 @@ const ListingBody = React.memo(
loadingQuery,
listingRef,
additionalFilters,
+ block,
} = props;
+
let ListingBodyTemplate;
let templateConfig;
// Legacy support if template is present
@@ -97,6 +100,7 @@ const ListingBody = React.memo(
// Also need to purge title from searchblock schema, it's the name of the listing template used
const listingBodyProps =
variation?.['@type'] !== 'search' ? data : { ...variation, title: '' };
+
return (
{loadingQuery && (
@@ -114,6 +118,7 @@ const ListingBody = React.memo(