Skip to main content

Hierarchical site and menu structure

Since Drupal stores all pages in a database, the webmaster is responsible for creating a hierarchical organization of the content. The visitors and search engines then navigate through a logically subdivided site structure.

Native Drupal URL for a page is example.com/node/271 or example.com/?q=/node/271. A user- and SEO-friendly URL is website.com/section/article

Modules needed:

Ensure that Clean URLs (/admin/settings/clean-urls) are enabled.

  1. Open the Pathauto admin control panel - Administer > Site configuration > Pathauto
  2. Expand the Node path settings pane. Enter [menupath-raw] into the default path pattern or a particular node type.
  3. If changing existing node aliases choose appropriate Update action in the General Settings section and select Bulk generate aliases
  4. Save settings.

This setup will generate URL paths that reflect selected menu hierarchy as chosen in Menu settings when creating a node.

Share this post