Hybris - Add a CMS Component Step-by-Step

Hybris - Add a CMS Component Step-by-Step Instructions

1. Add  itemtype definition to -itema.xml


<itemtype code="MyParagraphComponent" generate="true"
    extends="CMSParagraphComponent" autocreate="true">
        <attribute qualifier="media" generate="true" autocreate="true" type="localized:Media">
           <persistence type="property" />

2. Update -locales_en.properties file by Adding localized attribute names and descriptions (OPTIONAL)

type.MyParagraphComponent.name=My Paragraph Component

3. Creating Controller

    create a new  controller class by extending AbstractCMSComponentController
       a. @Override fillModel method
       b. add @RequestMapping

4. Create View MyParagraphComponent.jsp

5. Add component to Valid Component Types

    add the component entry to cms-content.impex

Alternately you can add entries to ComponentTypeGroups2ComponentType

6.  You can customize the hybris WCMS Cockpit for the component via the XML configuration:

editorArea_typeName.xml: configuration file for the WCMS Cockpit editor area.
contentEditor_typeName.xml: configuration file for Live Edit mode and in-line editing.
wizardConfig_typeName.xml: wizard configuration, if a component is added via a wizard dialogue.

Detailed instructions can be found in the Hybris Wiki page below



Popular posts from this blog

Hybris Setup locally on your System