---
canonical: https://amplience.com/developers/docs/schema-reference/schema-examples/hierarchies/site-menu-hierarchy/
title: Site menu hierarchy example
description: This Amplience Site menu hierarchy example is used to model a site navigation menu. This is a self contained schema, register the site menu hierarchy to use it.
audience: Developer
image: https://cdn.media.amplience.net/i/ampproduct/add-existing-node-4?w=1200&h=630
image_width: 1200
image_height: 630
date_published: 2022-07-01
date_modified: 2025-04-30
---

# Site menu hierarchy example

This is an example hierarchy used on the [using hierarchies](https://amplience.com/developers/docs/dev-tools/guides-tutorials/hierarchies) page. This simple hierarchy is used to model a site navigation menu.

## Pre-requisites

See the [using the content type schema examples](https://amplience.com/developers/docs/schema-reference/schema-examples/use) page for details of how to choose and register these schemas from the schema examples in Dynamic Content.

## How to use

This is a self contained schema, you will just need to register the site menu hierarchy and use it to create content.

## Site menu hierarchy

This is the site menu hierarchy schema. Note that in the `childContentTypes` array in the hierarchy trait, only includes the site menu type itself, so this is the only type of content that can be added to the hierarchy.

The `trait:sortable` object is set up to support the hierarchy drag and drop feature. Users will be able to drag hierarchy nodes to anywhere within the hierarchy.

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema-examples.com/site-menu-item",
  "$comment": "Docs: https://amplience.com/docs/development/schema-examples/hierarchies/site-menu-hierarchy.html",
  "title": "Site menu hierarchy",
  "description": "A simple hierarchy used to model site navigation. Supports hierarchy drag and drop.",
  "allOf": [
    {
      "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
    },
    {
      "$ref": "http://bigcontent.io/cms/schema/v2/hierarchy#/definitions/hierarchy-node"
    }
  ],
  "trait:hierarchy": {
    "childContentTypes": ["https://schema-examples.com/site-menu-item"]
  },
  "trait:sortable": {
    "sortBy": [
      {
        "key": "default",
        "paths": ["/_meta/hierarchy/position"]
      }
    ]
  },
  "type": "object",
  "properties": {
    "title": {
      "title": "Title",
      "description": "Title used for the menu item",
      "type": "string",
      "minLength": 0,
      "maxLength": 100
    },
    "description": {
      "title": "Description",
      "description": "description",
      "type": "string",
      "minLength": 0,
      "maxLength": 100
    },
    "_meta": {
      "type": "object",
      "properties": {
        "deliveryKey": {
          "type": "string",
          "title": "Delivery key",
          "description": "The delivery key is used as the URL slug"
        }
      }
    }
  },
  "propertyOrder": []
}
```

## Content form preview

An example of creating a content item using a content type registered from the site menu hierarchy example schema is shown in the image below.

![The site menu hierarchy](https://cdn.media.amplience.net/i/ampproduct/add-existing-node-4?w=1880&fmt=png 'The site menu hierarchy')

## Related Pages

[Using hierarchies](https://amplience.com/developers/docs/dev-tools/guides-tutorials/hierarchies)
