Page Hierarchy
In Modx, your Site Tree keeps track of all the pages and resources of your site. The Site Tree is located on the left hand side of each and every Modx manager page. If you click the green down arrow above the Site Tree, it will expand so you can see at a glance all of the pages and resources of your site.
Depending on the size of your site, you may have parent pages and children pages (remember, pages are called Resources in Modx). Keeping pages organized is very important when working in any content management system, such as Modx, but it becomes especially important when you have a large website with many pages.
In Modx, each page can be a parent page, meaning it can have child pages underneath it. This keeps things organized in your modx manager, but it may also help organize links and menu items on the front end of your website that your visitors will see. For example, the ModxTraining.com site, has multiple levels of pages, starting with the 5 main links you see across the top of this page. Two of the pages, Home Page and About Page, do not have any child pages.
However, Getting Started, Tutorials, and Contact all have children pages. And the Tutorials page even has grand child pages, meaning it's children have children. Let me explain.
If you look on the right side of this page, you see a "Tutorials" heading listing of all the tutorials on this site. Tutorials Page is the parent page and it currently has 5 child pages: Getting Started, The Text Editor, Managing Pages, Security and Users, and Miscellaneous Tutorials. Each one of those pages has children underneath it, except for Security and Users (currently). If you look under the Getting Started page/category, you will notice that it has 6 children under it.
It's important to understand the relationship of pages within your site, so you can better manage it and present it to your visitors. Now let's talk about some practical things you may need to do within Modx to keep things organized in parent-child relationships.
Adding a New Child Page
- The easiest way to add a child page is to right-click on the page in your Site Tree that you want to create a child page under and choose CREATE RESOURCE HERE. This will automatically create a new page/resource and place it underneath the page you right-clicked on.
Making an Existing Page a Child Page
- Right-click on the page/resource that you want to make a child, and select MOVE RESOURCE.
- Modx will then instruct you to click on the page in the Site Tree that you want to place the child page underneath.
- Click SAVE in the upper right part of the screen.
Moving a Child Page to the Top Level
- Right-click on the page/resource that you want to move, and select MOVE RESOURCE.
- Modx will then instruct you to click on the page in the Site Tree that you want to place the child page underneath. Click the site name at the very top of your Site Tree.
- Click SAVE in the upper right part of the screen.