I'm currently working on a patch that will show the chain of parents when viewing a child node.

This won't work when a child has multiple parents (I'm currently thinking it will simply pick the first parent)...but I'm open to suggestions on this. I'll have a patch up here soon for review.

CommentFileSizeAuthor
#1 relativity.module.patch1.52 KBjhedstrom

Comments

jhedstrom’s picture

Status: Active » Needs work
StatusFileSize
new1.52 KB

Here's the beginnings of this functionality.

It won't display breadcrumbs initially, as it has a variable (currently named relativity_set_breadcrumb_trail) that defaults to false, but I haven't added this to the admin menu, as I wasn't sure the best place to set it. So to test it, relativity_set_breadcrumb_trail will need to either be set to true in the database, or at the code level.

I'll try and clean this up when I get more time.

[edit]
My apologies. The original patch I uploaded had a typo in it ($parent_ode instead of $parent_node). I've uploaded the corrected patch.
[/edit]

CoolDreamZ’s picture

As you are talking about breadcrumb functionality I think the trail should show how the user navigated to the node. So, for example:

Home->Root->GrandParent->Parent->Child

Another suggestion would be to do this as a block instead, something like this:

ANCESTORS

  • GrandParent 1
  • GrandParent 2
    • Parent 1
    • Parent 2
      • Current Node
      • Sibling 1
      • Sibling 2
      • Sibling 3
      • etc
CoolDreamZ’s picture

Another suggestion:

For example, in the breadcrumb trail Home->Grandparents->Parents->Children->CurrentNode:

GrandParents could give a teaser list of all Grandparents of the CurrentNode
Parents could give a teaser list of all Parents of CurrentNode
Children could give a teaser list of all Siblings of CurrentNode

This could be a little tricky and there could be performance implications for very deep/large hierarchies. Also, as you are looking at recursion, I am not sure if there is the risk of a circularity (e.g. a GrandParent of X could also be a Child of X?) with Node Relativity

Alternatively you could use the "Views" and "Custom BreadCrumb" modules to achieve the effect you are looking for?

See here: http://drupal.org/project/custom_breadcrumbs