5

How can I enable a single node to have multiple parents (D7)?

Is it possible to show the hierarchical structure in the menu, therefore breadcrumb?

Can I set a structure like the following?

Home > Section 1 > SubSection A > 'my node' Home > Section 2 > SubSection B > 'my node' Home > Section 2 > SubSection B > 'my node'

Before you ask/suggest:

  • I used nodehierarchy on a previous project, and the subfeature 'Allow multiple parents" seems a little buggy at the moment

  • Duplicate content is not a problem here, since it's an intranet

Do you have any suggestion?

2

You should definitely use the taxonomy for this. Taxonomy allows you to have multiple sections/subsections with no effort whatsoever, and several terms can be added to each node.

However, for the breadcrumb, you'll have to code something about this. AFAIK, the default terms variable in a node template doesn't display the hierarchy, and the breadcrumb only shows one path.

Furthermore:

  • taxonomy_menu allows you to easily transform a vocabulary into some matching menu.
  • Alternatively, you can get the taxonomy tree for each term associated with a node using taxonomy_get_tree. (And display it the way you wish.)
4

The meny system can't do that

The Drupal menu system does not support what you want to do. Each entry has exactly one parent (which is id -1 if at the top).

The taxonomy module however, can

One could map the menu structure onto a vocabulary tree. The complex part here will be the node <=> term mapping, as I'm not aware of a module for that.

However, it's also worth noting that given that nodes and terms are very similar in D7, it's entirely possible to just migrate to using Terms for your main content, if the multiple parents hierachy generally makes sense for you. This could avoid a lot complexity.

Other options

One also make something completely custom or build the hierachy directly onto the entities with entity references, or separately as relations.

Node hierachy

If there is a module that solves your problem, you should probably be using it. Since Node hierachy is apparently one such option, it's worth your attention. If it really is buggy, you may want to consider helping out with that, if it helps to avoid a large custom effort.

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.