Navigation management in SAP Hybris Commerce

Navigation management through impex

When we create a website based on an existing content catalog, a default navigation structure is created for our content catalog. If we create a website based on a new content catalog, we must build navigation structure for our new content catalog. So we will learn here how to create navigation nodes using impexes.

Create new navigation node using impex

To explain this we will create one new custom navigation node in apparel storefront. In apparel storefront, there are 5 navigation nodes as shown in the image and we will add another navigation node at the end of navigation nodes.

Apparel Store
Apparel Storefront

Steps to create a new navigation node

Step-1

Create a new CMSNavigationNode. Like created in below image.

CMSNavigationNode

Step-2

Create a new CMSNavigationEntry for CMSNavigationNode. Like created in below image.

CMSNavigationEntry

Step-3

Create a new CMSLinkComponent. Like created in below image.

CMSLinkComponent

Step-4

In this step, we do localization of CMSNavigationNode and CMSLinkComponent as shown in the image

Localiztion

The complete impex will look like this.

create_navigation_node
new_navigation_node.impex

Here we assume that your server has started already. Now run the above impex(new_navigation_node.impex) in HAC(Hybris Administration Console) and synchronize the content catalog(apparel-ukContentCatalog).

Now access the apparel storefront and you can clearly observe newly created navigation node. In below image, you can see new custom navigation node.

Apparel store with new node
Apparel store with new navigation node

Create Children nodes of Custom navigation nodes

Now we will create children of above-created navigation node. To create children of above-created navigation node, we need to follow the following steps

Step-1

Create a new CMSNavigationNode. Like created in below image.

ChildrenCMSNavigationNode

Custom Brands Nav Node is a child of Custom Nav Node and Custom Brands Nav Node is the parent of bitbyte Link and hybrisdiary Link.

Navigation tree structure

Step-2

Create a new CMSNavigationEntry for children nodes. Like created in below image.

CMSNavigationEntry For Children

Step-3

Create a new CMSLinkComponent. Like created in below image.

CMSLinkComponentForChildren

Step-4

In this step, we do localization of CMSNavigationNode and CMSLinkComponent as shown in the image.

Children's localization

The complete impex will look like this.

Complete impex for children node
new_navigation_children_node.impex

Here we assume that your server has started already. Now run the above impex(new_navigation_children_node.impex) in HAC(Hybris Administration Console) and synchronize the content catalog(apparel-ukContentCatalog).

Now access the apparel storefront and Hover on custom navigation node and you can clearly observe newly created children(HYBRISDIARY and BITBYTE) of custom navigation node. In the below image you can observe.

Apparel store with Childrens
Apparel store with new navigation node and with its children

Navigation management through SmartEdit

Navigation management through SmartEdit

SmartEdit provides Navigation management that enables you to add, move, edit and delete navigation nodes for a content catalog. You can easily change the order of the navigation nodes using drag and drop feature. You can also add, edit and remove entries from navigation nodes. Entries are pages, media, and components that you associate with navigation nodes.

When you create a website based on an existing content catalog, a default navigation structure is created for your content catalog. If you create a website based on a new content catalog, you must build navigation structure for your new content catalog.

 

Signing into SmartEdit

SmartEdit provides an intuitive user interface that allows content managers to easily edit the content catalog of their companies website.

Procedure

We assume that your server has started already and now follow following steps to sign in into SmartEdit

  1. Open an internet browser.
  2. Enter https://<server.ip.address>:9002/smartedit in the browser’s address bar.
  3. Enter your credentials.(username=’admin’ and password=’nimda’)
  4. Select the language and sign in.

smartedit

All the catalogs that are available in your websites are displayed in the Your Site page.

yoursite

Adding Navigation Nodes

We can add following types of navigation nodes:

  1. Top level
  2. Sibling
  3. Child

 

Adding a Top level Node

toplevel

Click on + ADD NEW TOP LEVEL and after that Enter the name of the node and title of the node to the corresponding fields and press save.

topnode

Now you can see that Bitbyte added as top level node to the site.

addnode

Adding Sibling and Child Nodes to Navigation Nodes

Go to navigation node that you want to add a sibling or child node to and Click the Option menu and select Add a Sibling or Add a child. Here we will add child node.

option

After that we enter the name and the title of the child and save it.

child

Now you can clearly observe that one child node(Hybrisdiary) added to the Bitbyte node.

addchild