Understanding Parent Pages in SDP

The Parent Pages feature in SDP allows you to organize your website content into a hierarchical structure. By nesting pages under a "parent," you can create logical sections, improve SEO with meaningful URL structures, and automatically generate breadcrumb navigation for a better user experience.

usage

Setting a Parent Page

To assign a parent to a page:

  1. Navigate to Website > Pages in the CMS.
  2. Click on the page you wish to edit to open the Page Designer.
  3. In the Page Details tab, locate the Parent Page section.
    • If no parent is selected, click Edit Parent.
    • Search for the desired parent page by title and select it.
    • Click Save.
  4. The page is now nested under the selected parent.

Template Default Parent

You can automate the nesting of pages by setting a default parent on a Page Template:

  1. Navigate to Website > Customize > Templates.
  2. Edit an existing template or create a new one.
  3. In the Default Parent Page field, search for and select the page you want to serve as the default parent.
  4. Now, any page created using this template will automatically be assigned that parent page by default.

Removing a Parent Page

To remove a parent association:

  1. In the Parent Page section of Page Details, click the Edit button.
  2. Clear the selection to detach the page from its parent.
  3. Click Save.

Key Features

1. Nested URL Structure

SDP automatically updates the URL of a child page to reflect its hierarchy.

  • Example: If you have a parent page "Products" (/products) and a child page "iPhone" (/iphone), the child page's full URL becomes /products/iphone.
  • Deep Nesting: You can nest pages multiple levels deep (e.g., /products/electronics/laptops).

2. Canonical URLs and Redirects

The system enforces the "canonical" (correct) URL structure.

  • Automatic Redirects: If a user tries to access a child page via its short slug (e.g., /iphone) or an incorrect path, they are automatically redirected (301 Moved Permanently) to the full, correct path (/products/iphone).
  • Deduplication: The system is smart enough to clean up duplicate segments. For instance, if a URL accidentally becomes /products/products/iphone, it will be normalized to /products/iphone.

3. Breadcrumbs

Assigning a parent page automatically generates Breadcrumbs on your frontend theme.

  • Example: Home > Products > iPhone
  • This helps visitors understand their location on your site and navigate back to higher-level categories easily.

4. Template Default Parent Association

Page Templates can specify a parent_page_id. This is particularly useful for tiered content:

  • Use Case: A "Product Page" template can default its parent to the "Products" overview page.
  • Automatic Hierarchy: Ensures new pages are correctly categorized without manual effort.

5. Permissions

Managing parent pages is a protected action.

  • Permission Required: pages.page.change-parent
  • Only users with this permission (typically Admins and Designers) can add, change, or remove parent page associations.

Best Practices

  • Group Related Content: Use parent pages to group similar content, such as "Services," "Blog Categories," or "Company" information.
  • Template Automation: Leverage template default parents for consistent site structure.
  • Keep Slugs Short: Since URLs are combined, keep individual page slugs short (e.g., use iphone instead of apple-iphone-product-page if it is nested under products).