---
canonical: https://amplience.com/developers/docs/dev-tools/content-modeling/hierarchies/managing-hierarchies/
title: Managing hierarchies
description: How to manage hierarchies, including how to remove a hierarchy node
image: https://cdn.media.amplience.net/i/ampproduct/remove-node-api-1?w=1200&h=630
image_width: 1200
image_height: 630
audience: Developer
date_published: 2025-01-30
date_modified: 2026-03-23
---

# Managing hierarchies

On this page we explain how to remove a node from a [hierarchy](https://amplience.com/developers/docs/dev-tools/content-modeling/hierarchies/about-hierarchies/).

## Removing a node from a hierarchy

When you remove a node from a hierarchy, the link between the node and its parent is still there in the published version of your content. In order to ensure that the node is not included when you list all children of its parent you need to either:

- Remove the node from the hierarchy and re-publish it. This is the approach to use if you still want to retrieve the published version of the content item.

or

- If you no longer need the content item: unpublish the node and then remove it from the hierarchy.

### Removing and republishing the node

In the example below we're removing the "Bathroom" node from its hierarchy.

![Removing a node from a hierarchy.](https://cdn.media.amplience.net/i/ampproduct/remove-node-api-1?w=1880&fmt=png 'Removing a node from a hierarchy.')

The bathroom node is no longer part of the hierarchy, but as you can see from the JSON returned by the Content Delivery v2 API, the parentId still contains the value of its previous parent node.

![The removed node still contains a link to its parent.](https://cdn.media.amplience.net/i/ampproduct/remove-node-api-2?w=1880&fmt=png 'The removed node still contains a link to its parent.')

When the item is re-published, the parentId will not longer be included in the JSON response and the item will no longer be returned as part of the hierarchy.

![When the node is re-published, the link to its parent is removed.](https://cdn.media.amplience.net/i/ampproduct/remove-node-api-3?w=1880&fmt=png 'When the node is re-published, the link to its parent is removed.')

### Unpublishing and removing the node

If you no longer need to retrieve the node using its production Content Delivery URL, you can use the unpublish feature.

In the example below, we no longer want the Dishwashers node to be part of the hierarchy. To unpublish the node, select it in the hierarchy so the content item the node represents is shown on the content form. Choose "Unpublish" from the "Save" menu to unpublish the item.

If you're no longer using the item, you may want to archive it.

![Unpublishing the content item.](https://cdn.media.amplience.net/i/ampproduct/remove-node-unpublish-1?w=1880&fmt=png 'Unpublishing the content item.')

After it is unpublished, the item will no longer be returned if we query all published children of its parent (in this case the Electricals node). However, it will still be returned when you query its parent using the [virtual staging URL](https://amplience.com/developers/docs/apis/content-delivery/filter-api/#using-the-filter-api-with-unpublished-content).

To remove the item from the hierarchy and the link to its parent, click the node in the hierarchy browser and choose "Remove node" from its menu.

![Removing the node. There is no longer any link to its parent node.](https://cdn.media.amplience.net/i/ampproduct/remove-node-unpublish-2?w=1880&fmt=png 'Removing the node. There is no longer any link to its parent node.')

### Implementing an isActive flag

Another approach you can use, if you're implementing something like a page hierarchy, is to include an "isActive" flag in the Content Type schema that you can use with the [filter API](https://amplience.com/developers/docs/apis/content-delivery/filter-api) to return only those nodes that are marked as active. This allows the user to choose which nodes will be returned.

## The hierarchy chooser extension

The hierarchy content field extension allows users to browse and add content items from a hierarchy rather than having to find these items in the Content Library. In the example of the recipe hierarchy, by using the hierarchy extension, it's easy to browse and add multiple ingredients.

![Tagging a recipe with items from the ingredients hierarchy using the hierarchies extension.](https://cdn.media.amplience.net/i/ampproduct/hierarchy-chooser-update-1?w=1880&fmt=png 'Tagging a recipe with items from the ingredients hierarchy using the hierarchies extension.')

To use the hierarchy extension you need to include either:

- The content item id of the hierarchy node from which the hierarchy can be browsed in the extension params. You can find the content item id from the properties pane in the content form, as shown in the image below.
- The delivery key of the node from which you wish to browse. You can also find this from the properties pane.

If you specify both the content item id and the delivery key, then the delivery key will take precedence.

![Finding the content item id of the node from which the hierarchy can be browsed.](https://cdn.media.amplience.net/i/ampproduct/hierarchy-chooser-update-2?w=1880&fmt=png 'Finding the content item id of the node from which the hierarchy can be browsed.')

The `ingredients` property shown below uses the extension registered as "hierarchy-extension" and passes the id of the root node of the ingredients hierarchy- the content item named "Ingredients".

```json
   "ingredients":{
      "title":"ingredients",
      "type":"array",
      "minItems":0,
      "maxItems":10,
      "ui:extension":{
         "name":"hierarchy-extension",
         "params":{
            "nodeId":"ea3e494b-f001-491a-9508-6387fecca1e0"
         }
      },
      "items":{
         "allOf":[
            {
               "$ref":"http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
            },
            {
               "properties":{
                  "contentType":{
                     "enum":[
                        "https://schema-examples.com/ingredients-list"
                     ]
                  }
               }
            }
         ]
      }
   }

```

Here's the same example referencing the node using its delivery key, in this case the node has a delivery key of `ingredients-main-list`. In the schema shown below, the hierarchy chooser extension is attached to the `ingredients` property using its hosted URL: `https://hierarchy-chooser.extensions.content.amplience.net`.

```json
   "ingredients":{
      "title":"ingredients",
      "type":"array",
      "minItems":0,
      "maxItems":10,
      "ui:extension":{
         "url":"https://hierarchy-chooser.extensions.content.amplience.net",
         "params":{
            "deliveryKey":"ingredients-main-list"
         }
      },
      "items":{
         "allOf":[
            {
               "$ref":"http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
            },
            {
               "properties":{
                  "contentType":{
                     "enum":[
                        "https://schema-examples.com/ingredients-list"
                     ]
                  }
               }
            }
         ]
      }
   }
```

### Registering the hierarchy chooser extension

To register the hierarchy extension, go the development home page and click the extensions icon, or choose "Extensions" from the Development menu. Click the "Register extension" button.

- In the registration window, choose "Content field" as the category.

- Add a label and name. The name will be used as the value of the "name" field in the `ui:extension` section of a property that uses the extension. In the `ingredients` property shown above the extension is named "hierarchy-extension".

- Enter `https://hierarchy-chooser.extensions.content.amplience.net/` as the URL.

- Click the "Permissions" tab to set the extension permissions. Set the "Read access" and "Allow same origin" permissions.

![Registering the hierarchy extension.](https://cdn.media.amplience.net/i/ampproduct/hierarchy-chooser-update-3?w=1880&fmt=png 'Registering the hierarchy extension.')

You can specify additional parameters from the "Installation parameters" tab or add them directly in your schema. The available parameters are as follows:

| Parameter     | Description                                                         | Required / Optional                                           |
| :------------ | :------------------------------------------------------------------ | :------------------------------------------------------------ |
| `nodeId`      | The content item id of the item to use as the root of the hierarchy | Required (one of `nodeId` or `deliveryKey` must be specified) |
| `deliveryKey` | The delivery key of the item to use as the root of the hierarchy    | Required (one of `nodeId` or `deliveryKey` must be specified) |
| `type`        | The display size of each node: large, small or chip                 | Optional. The default is "large"                              |

When you've finished setting up the extension, click "Save" and the extension will be registered and available to include in your schemas.

See the [hierarchy chooser extension GitHub repository](https://github.com/amplience/dc-extension-hierarchy-chooser) for more details on the configuration options.

## Related pages

[Introducing hierarchies](https://amplience.com/developers/docs/dev-tools/content-modeling/hierarchies/about-hierarchies/)

[Creating content type schemas for hierarchies](https://amplience.com/developers/docs/dev-tools/content-modeling/hierarchies/hierarchy-schemas/)

[Working with hierarchies](https://amplience.com/developers/docs/user-guides/produce-content/hierarchies)

[List, filter and sort content](https://amplience.com/developers/docs/apis/content-delivery/filter-api)

[Hierarchy API](https://amplience.com/developers/docs/apis/content-delivery/hierarchy-api)

[Registering extensions](https://amplience.com/developers/docs/integrations/extensions/register-use)

[Hierarchies limits](https://amplience.com/developers/docs/apis/limits/#hierarchies)
