0

We've been trying to implement a site architecture that has a consistent menu, breadcrumb and path structure for all pages in the site.

This is easy for basic pages since the path can be set using the page's menu position (using pathauto), as can the breadcrumb.

eg: site.com/a-page/b-page

However, we also have 'articles' which appear in lists on certain pages, using certain tags.

The issue comes in preserving the consistent menu location (but no menu item), URL and breadcrumb for these articles whilst keeping the system easy to maintain.

eg: site.com/a-page/b-page/article-1 eg: site.com/a-page/b-page/article-2

(Most Drupal sites seem to just give up and use site.com/article-title ?)

Not all the articles are just 'news' so we don't want to just force the path to one format option using pathauto.

One solution we've identified for these articles is:

Add a field to the taxonomy for 'path to parent' which would contain the path to whatever page the articles are listed on (eg: a-page/b-page/) and then pathauto could then use this to build a relevant path to the content. Then create a Context for each term which sets the Breadcrumb and Menu trail to the correct location.

However, this does not seem very easy to maintain?

Does anyone know of a better solution?

0

I think instead of using Article content type, you should use Book content type. so you could create a book page named a-page, then a page named b-page and provide it a-page as parent in options below. Now start adding article-1 and article-2 as child of b-page.

So when you view these pages article-1 or 2 the breadcrumb and will provide the url as site.com/a-page/b-page/article-1

Correct me if i misunderstood the question and do tick right if the answer is right.

-2

I'm looking at Drupal for the first time and I found the lack of hierarchy support troubling and I think constantly updating taxonomies would be too much overhead for any large site, especially with a distributed authoring base (e.g. large corporation or government agency).

I think I have found a solution using module Node Hierarchy (primarily) and some other modules.

Essentially you specify which content types are allowed to be children and/or parents, and then when editing a node you have the option to 'create child'. Once child nodes are created, the parent node will have an option to view child nodes, and ordering can be controlled from this screen.

Use module Pathauto to automatically render URL alias based on parent-child-[child] relationships.

Finally use module Menu Block to add menus based on parent-child hierarchies.

A more detailed description/instruction is here:

https://www.youtube.com/watch?v=oz3xkF819c0

EDIT: Updated my answer to better conform to guidelines.

  • 1
    Welcome to Drupal Answers! Whilst this link may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Mołot Nov 14 '14 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.