Nested pages parent/child/child

@ctuxboy, As always, it depends…

Based, for example, on one or more of the following criteria:

  • Navigation style of the site
  • Functionality provided to the user
  • Maintainability of pages in terminal or Admin.

Restricting myself to your site only…

One of the core features of Grav are collections of pages. Collections can be based on the hierarchy of folders (e.g. page.children, page.descendants, page.siblings), or based on Taxonomy, or a combination of both.

Looking at your site, currently, a user navigates through your site by selecting a child of the current page from a list (read collection) of children. Structuring your folders in a hierarchy will automatically create the correct collections for each page. This will make creating the list of children very easy.

However, I can imagine your users would also like to search for dog parks based on some criteria: parking, fenced or agility facilities. Based on the taxonomy (categories, tags, …) added to the header of pages, a collection can be created and filtered based on the search criteria of the user.
Taxonomy collections are independent of the folder structure being used.

Both types of collections can be mixed together, like “all descendants of page X that have been labelled with ‘fenced’”.

Also, collections can be created programmatically in both Twig and PHP.

1 Like