I'm working with Hybris 2205 and Spartacus 4.3.8, I created a new ItemType in Hybris (back-end) and inserted a new object/instance (Item) of that ItemType right into the database by using Impex, doing after the corresponding ant clean all and etc.
Now, the thing is that I was able to render a CMS custom component by following the SAP tutorials, but the component I used/customized is stored in @Spartacus/core, so all I needed to work with it was to import it:
.
Specifically, I used that CmsBannerComponent
(which is a default CMS component (back-end) that already exists in @Spartacus/core) to map a brand new Angular component and render the latter in the Storefront.
Now, I want to do the same but using my CMS Component (Item) that I created in Hybris, which as I have already said and unlike "CmsBannerComponent", is not in Spartacus and cannot be imported.
I searched a lot, but couldn't find anything. If you need any kind of extra clarification or screenshots then tell me, I will update the question as fast as I can.
You can create new cms types in the module configuration.
Suppose you have a component in your type system: MyNewComponent (that inherits from CMSItem), and you created your angular component with the name NewComponent. To bind the itemtype to the specific visualization, you can use the following configuration in your module
ConfigModule.withConfig({
cmsComponents: {
MyNewComponent: {
component: NewComponent
},
},
} as CmsConfig),