CloudNir

Home » WCMS

WCMS


The SAP Hybris Commerce 6.0 Developer expects you to know the Web Content Management System (WCMS) cockpit, in this chapter readers will learn the different CMS component hierarchy and items, learn how to create new CMS component, explore the store and website data model, will learn how to create a manage warehouse and point of sales, finally you will learn how to create restriction using the BTG extension.

CMS Items hierarchy

Every CMS components inherits from the ‘CMSItem’ type, this type declare 3 attributes :

• catalogVersion
• name
• uid

Each CMS components can have multiple versions, default is a Staged and an Online version. Hence all items within the CMS hierarchy are catalog version aware. It gives you the ability to manage any sort of contents (Medias, Pages,
Slots, Nodes…) within on catalog version and then synchronize your content once it’s ready to go live.

CMSItem and CMSRelation are managed inside a content catalog,this catalog is only a subtype of the Hybris Catalog and add no extra functionnalities

Simplified view of the CMS Items hierarchy:

CMSItem And CMSRelation

CMSItem CMSRelation

CMSItem types

CMSItem type and CMSRelation type unicity is guaranty with a key made of catalogVersion and UID.

<itemtype code="CMSItem" jaloclass="de.hybris.platform.cms2.jalo.contents.CMSItem" 
  extends="GenericItem" autocreate="true" generate="true" abstract="true">

<attributes>
        <attribute qualifier="uid" generate="true" autocreate="true" type="java.lang.String">
                <persistence type="property" />
                <modifiers optional="false" unique="true" />
        </attribute>
        <attribute qualifier="name" generate="true" autocreate="true" type="java.lang.String">
                <persistence type="property" />
        </attribute>
        <attribute qualifier="catalogVersion" type="CatalogVersion">
                <modifiers optional="false" unique="true" />
                <persistence type="property" />
        </attribute>
</attributes>
</itemtype>


<itemtype code="CMSRelation" jaloclass="de.hybris.platform.cms2.jalo.relations.CMSRelation" extends="GenericItem" autocreate="true" generate="true">
<deployment table="CMSRelations" typecode="1100"/>

<attributes>
        <attribute qualifier="uid" generate="true" autocreate="true" type="java.lang.String">
                <persistence type="property" />
                <modifiers optional="false" unique="true" />
        </attribute>
        <attribute qualifier="catalogVersion" type="CatalogVersion">
                <modifiers optional="false" unique="true" />
                <persistence type="property" />
        </attribute>
</attributes>
</itemtype>

When do we use CMSItem type and when do we use CMSRelation ?

• CMSItem when you create a new CMS item, like a new component or a new type of pages.
• CMSRelation when you create a new type which is not a CMS component but still need to be catalog version aware

Related Topics :

  • CMS Components
  • Personalization
  • Create a CMS restriction