Is it possible to add the standard link operations (remove, add, attach existing) to the views that are used to display the child nodes?

It will be good if there is an option that defines when and whether to display the link operations.

Comments

owahab’s picture

Priority: Critical » Normal

How could a feature be critical? :)

kirilius’s picture

Sorry, I am not very familiar with the meaning of the the different priorities. At least it is critical to me ;-)

The reason I am requesting this feature is that it (or something very close to it) was already announced in this patch http://drupal.org/node/130870 and later on removed. Still this is what I really need.

In fact I think not only I need this. The idea is to separate the link operations and move them to a different page from the parent node. After all the child nodes may be hundreds or even more. it makes perfect sense to separate them and provide a view that will display them in pages. It also make sense to make the link operations (remove link) adjacent to the child nodes. Here is the scenario that I am talking about (already described in the link above):
-----------------------------
What I am trying to achieve:
1) I have an A-type node with multiple child nodes of type B-node
2) B-node is an image (created using CCK, imagefield and Imagecache)
3) In the full view of the A-node I want to see it's contents followed by a couple of image thumbnails of the B-node children + a link "more"
4) That link will lead to a page where all B-node children are listed along with the link operations (remove, etc.)
-----------------------------

kirilius’s picture

An ever better idea would be to display the child-nodes-view on a separate tab within the parent node. This will almost eliminate the need for adding breadcrumb trail on top of the view.
;-)

looplog’s picture

Any further work on implementing this? This is something I really need for my current development site so if nothing arises I'll be working on my own solution.

I've been searching to see how various others have implemented views links fields fro different modules, but I'm not getting too far with my limited knowledge. I had a look at the patch above to see if I could understand the relevant code but patches are very difficult to decipher for code newbies!

So here are the approaches I've been thinking about:

Would this be achievable by adding the relativity link-operations as actions (actions.module) to relativity, which can then be displayed in views using views actions module? This seems a somewhat longwinded approach but it also opens the door for workflow integration (eg, change the status of a node and it automagically gets added to a different relativity tree).

Along these lines but possibly more useful in the future, and certainly much more work, would be to utilize Workflow-NG module's Content Links to create the links, and modify this module to integrate with views.

The other option seems to be to replicate the functions in Views for adding the edit and delete links, modifying them as necassary for relativity, but I don't even know if this would be the right approach.

For me these are all pie in the sky at the moment, but hopefully someone reading might have a better idea. Any thoughts?

looplog’s picture

In the meantime I've found a somewhat simple approach that works.

I was unaware that the CCK Link module has full support for Token module, and can thus pass the appropriate arguments to a link, whilst returning to the view after. So by creating a CCK link field for the appropriate content type I get a workable solution. The example below is to create a node of type note. By using the [path-arg-2] token as the return argument I can display, via Views Field within the notes, a nested tree/list of nodes inside nodes, adding new nodes as necessary and still returning to the view no matter where a new node is added to the tree.

node/add/note/parent/[nid]?destination=node/[path-arg-2]

It's not perfect for a few reasons, but it works for now...

kirilius’s picture

Thanks for the ideas. I am also looking forward to any work done on this request. This is a feature that will definitely make the Relativity module more usable.

kirilius’s picture

Hi there, are there any plans for completing this request?