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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | relativity.module.patch | 1.52 KB | jhedstrom |
Comments
Comment #1
jhedstromHere'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]
Comment #2
CoolDreamZ commentedAs 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
Comment #3
CoolDreamZ commentedAnother 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