Exploring Magento 2 Backend: Page Hierarchy

- E-Commerce, Magento 2

Magento 2 page hierarchy

Today, we shed light on how to organize your store’s page hierarchy. By default, the Magento 2 admin gives you the ability to manage your content pages: you can add pagination, navigation, menus, etc. If you regularly publish a large amount of content, this article will help you organize your materials to make it easy for store visitors to find articles they need. We describe other admin sections here: Magento 2 Backend Exploration.

'

Magento 2 Page Hierarchy Explained

The Magento 2 page hierarchy system is based on nodes. It uses them to identify related pieces of content and organize pages into parent-child relationships. In this system, nodes act as folders. Below, you can find some facts that explain the Magento 2 page hierarchy:

  1. Thus, a parent node can contain other nodes (child nodes) as well as pages (articles and other materials). 
  2. The same is about a child mode: it can have other nodes and materials inside. 
  3. To simplify navigation, Magento 2 utilizes a tree hierarchy to display relative positions of nodes and pages. 
  4. Also, note that a single content page might be associated not only with multiple nodes but also other content pages. This interaction leads to parent-child or neighbor relationships.

How to Configure Page Hierarchy in Magento 2

Let’s see how to activate and configure the Magento 2 page hierarchy. The corresponding section is available under Stores-> Settings-> Configuration in the Magento 2 admin. Choose General from the panel on the left and proceed to the Content Management section. Next, open the CMS Page Hierarchy tab to make any necessary changes:

  • Enable Magento 2 page hierarchy (Enable Hierarchy Functionality);
  • Turn on metadata (Enable Hierarchy Metadata);
  • Choose a layout for a hierarchy menu (Default Layout for Hierarchy Menu).
  • Click Save Config when complete.

Magento 2 page hierarchy

How to Add a Node in Magento 2 Page Hierarchy

Below, we shed light on how to create a node with simple navigation. Note that a single node doesn’t have a content page associated with it. However, it has a URL key so that you can add a link to a node with articles to other CMS pages. 

Use the Widget tool to generate a CMS Hierarchy Node link. Next, you can add the corresponding widget to a content block or page. 

Create a page hierarchy node

Visit the Hierarchy screen under Content-> Elements-> Hierarchy and click Add Node.

Magento 2 page hierarchy

Now, follow these steps to create a Magento 2 page hierarchy node:

  1. Configure Page Properties:
    • Set a node title;
    • Enter a URL key: use lowercase characters and hyphens (instead of spaces);
      Magento 2 page hierarchy

  2. Save your new node. Now, it is available as a folder in the tree on the left.
    Magento 2 page hierarchy

Add pages to the node

  1. Now, when your new node is in the hierarchy tree, you can open it in edit mode. Just click the node.
  2. When in edit mode, scroll down to the CMS pages section to choose the content you want to add to the node. Select the checkbox of each page you need.
  3. After that, click the Add Selected Pages(s) to Tree button.
    Magento 2 page hierarchy

Define the node structure

You can change the position of pages in the node. Use the drag-and-drop capabilities of the tree. 

Magento 2 page hierarchy

Now, let’s work with the metadata section of the node. Do the following under the Render Metadata in HTML Head section:

  1. You can identify the node as the top of the hierarchy. To do it, set First to Yes.
  2. Next, you can enable pagination control. Proceed to the Next/Previous option and set it to Yes.
  3. Besides, it is possible to organize the pages in the hierarchy as a book. You have to set Enable Chapter/Section to Yes to enable the feature.
  4. Nest, proceed to the Chapter/Section option. Here, you can assign your node to a specific part of the book: Chapter, Section, or Both. Choose None to exclude the node from the book.

Magento 2 page hierarchy

Add pagination controls to the node

  1. Proceed to Pagination Options for Nested Pages. Here, you should set Enable Pagination to Yes to reveal more options and enable the feature.
  2. Specify the number of page links to add to the pagination control in the Frame field.
  3. As for the Frame Skip field, specify the number of pages to skip ahead/back for the next set of pagination links.

Magento 2 page hierarchy

Configure the menu layout

Now, let’s enable the Magento 2 page hierarchy node in the menu. Go to Page Navigation Menu Options and enable the Show in Navigation Menu setting. You will see new settings:

  1. Specify the position of the menu concerning the content. You can select one of the following options from the Menu Layout dropdown: Use Default, Content, Left Column, or Right Column.
  2. Next, you can configure the degree of the menu details. Choose one of the following options from the Menu Detalization dropdown:
    • Only Children – show only subpages;
    • Neighbors and Children – show pages of the same hierarchy level.
  3. After that, you can set the maximum number of levels to determine the depth of the menu (Maximal Depth).
  4. The two final options are List Type (Ordered or Unordered) and List Style (Default, Circle, List, Square). Use them to format the menu appearance.

Magento 2 page hierarchy

You can add the node to the main navigation menu of your Magento 2 website. Under Main Navigation Menu Options, set Show in Navigation Menu to “Yes.” Save changes when complete.

Magento 2 page hierarchy

How to Import & Export Magento 2 Page Hierarchy 

Now, let’s concentrate on another aspect related to a Magento 2 page hierarchy. If you are going to migrate to a new store or need to transfer an old page hierarchy to an existing website, you’ve come to the right place. Unfortunately, the default platform’s tools don’t let you do that. However, you can easily import any page hierarchy into Magento 2 with the help of the Improved Import & Export Magento 2 extension. Our module can import and export all core Magento 2 entities, and page hierarchy is not an exception. Besides, it uses different connection types so that it is possible to leverage the extension to integrate your e-commerce store with any external system. 

You can simplify the data migration between Magento 2 and Magento 1 or Magento 2 and Magento 2 even more with the free Magento 1 to Magento 2 Migration add-on. The tool works upon the Improved Import & Export Magento 2 extension providing additional data transfer capabilities and automating import and export processes. 

You can use both tools to import Magento 2 page hierarchy data. Everything happens right in your admin. Alternatively, it is possible to use simple CLI commands. 

Both the extension and its add-on let you benefit from a selective approach to the migration. You move entity after entity so that there is no downtime. However, you need to reindex after every data transfer. 

Before using the Free Migration add-on, install the Improved Import & Export module. Download the add-on from your Firebear account after buying the module. Contact us if any questions occur.

To import page hierarchy to Magento 2, follow these steps:

  1. Create a new import job under System-> Improved Import/Export-> Import Jobs.
  2. Enable the job, specify its title, and configure other General Settings;
  3. Proceed to Import Settings and choose Page Hierarchy from the Entity Dropdown;
  4. Configure Import Behavior and determine Import Source.
  5. Save & Run the job.

That’s it!

Also, note that our extension works with the following entities: 

  • Categories;
  • Inventory;
  • Products;
  • Product reviews and ratings;
  • Orders;
  • Order shipping data;
  • Order Quotes
  • Product media (images and videos);
  • Product Attributes;
  • Customers and all the related data;
  • Customer groups;
  • Customer wishlists;
  • CMS blocks and pages;
  • URL rewrites;
  • Store administrator accounts;
  • Catalog price rules and cart price rules;
  • Invoices and other documents;
  • Taxes and order taxes aggregated;
  • Newsletter subscribers.

New entities are added with every update.

Also, note that you can automate the Magento 2 page hierarchy import with the Improved Import & Export Magento 2 extension since it provides the ability to create cron schedules. Another essential benefit introduced in our module is the ability to use API and Google Sheets to import/export data. Different file formats and archives are supported! Moreover, you can easily avoid problems caused by different attributes with the help of mapping presets. Both the extension and its add-on are described here:

Get Improved Import & Export Magento 2 Extension

Get Free Magento 1 to Magento 2 Migration Add-On

'