In my search to find output that was formatted the way I wanted it, I came up empty. I decided to create a module that would produce the output I wanted. What the module produces is a single page report that is a simple hierarchical list of all related nodes, starting with the node type specified in the configuration options.
The attached file is the result of that work. I decided to share it with the users of the Node Relativity module, in case anyone else found it useful. I don't really plan on producing a project for it, because I don't see myself modifying it a whole lot beyond what I've already done. However, if I do modify it significantly, I'll post updates here to share.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | snapshot4.png | 68.96 KB | oadaeh |
| relativity_report-5.x-1.x-dev.tar_.gz | 8.02 KB | oadaeh |
Comments
Comment #1
deadlyminds commentedCan you post a screenshot of this result? Will help in seeing how it looks...Also this 'report', is it for each node which has nodes attached to (via relativity module) or is a snapshot of all related nodes in a site?
I also presume you install this like anyother module?
Comment #2
oadaeh commentedI'll may do that, but it will be a bit of work, as I'll have to create a whole structure for doing a screenshot. I have this module in use on a private site, and therefore, I won't be able to use it in the screen shot.
It is only for nodes that are related via the Relativity module (which it is why it is posted in the Relativity module's issue queue). It uses functions and code only found in that module, so there is not a general use case for it. The report just shows the nodes' titles, but provides links to the complete node.
Yes. I tried to make it just like any other module. Although I did forget to add a .install file, so there will be a variable left behind if uninstalled. I may add that later.
Comment #3
oadaeh commentedI decided to just go ahead and do this now, so that it wouldn't be something hanging over my head.
I used a genealogy line as the example. I created a single node type (Person) and configured the Node Relativity module to allow the node type to be able to have one or more Person node types as both parent and child. So, the top level list has all nodes of type Person, and then under that are any child nodes that may be attached to the top level node, and so on.
Comment #4
deadlyminds commentedNeat....I'm new to node relativity but Im sure this'll help with the travel site I'm building. I believe the report is restricted to children (and relations) of a particular content type or does this work for a single node? (Eg. I have a node cars with several car brands as its children)
Comment #5
oadaeh commentedYou are correct in that it shows all nodes of a specified content type. If you want it to only show relations from a single node, create a new node type that is basically a duplicate of an existing one and just create one node of that type. You'll then have to disable that type in the menus area (admin/build/menu), so more cannot be created.
Comment #6
deadlyminds commentedI didn't think of that. So basically I will create a 'content type' (you said node type), clone this from another node and show children...It's better if I use it. Thanks again
Comment #7
oadaeh commentedYes, content type is correct.