Closed (outdated)
Project:
Collection
Version:
6.x-1.1-rc3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2009 at 15:44 UTC
Updated:
2 Feb 2021 at 17:25 UTC
Jump to comment: Most recent
Comments
Comment #1
xen commentedI can see how it could be useful, however, it's not easy to implement in any way proper.
For instance, say that the node_reference field is set to use a view for validation, there's no way for the block to determine whether the node that the user is looking at, is one that is part of that view, so the block might insert a reference to a node that's not allowed by the field. And I'm not sure it's possible to run the widget validation outside the node form.
But if you really need it, it's not that difficult to use collection_field_name() to find out what the field name is on the collection, adding the nid, and saving the node.
Comment #2
toemaz commentedHi Xen,
Thanks for the quick reply and good catch concerning the view validation.
Before I will go ahead and try to make this contrib module, I was wondering, do you know about modules who do similar things like your collection module does? I have been looking for a module which let users make collections of nodes and arrange them in order. Just like Youtube playlist functionality sort of speak. Seems like your module is the first one coming close to match my specific needs.
Comment #3
xen commentedYou might want to check out nodequeue and nodefamily. That two modules I can think of that deals with node relations, but in very different ways. It depends entirely on what you want to do precisely, whether you need a node for the collection, do you need any number of collections per user, etc.
Comment #4
xen commentedComment #5
henrijs.seso commentedI would like to see this feature implemented. Many use cases have foreseeable configurations, for example, collection nodes can be made by any user and he is allowed to add any published node to collection. It would be so simple to provide block with a list of user created collections on collectible nodes. User could just click on collection to add node to it.
Comment #6
xen commentedAs I've already said, it sounds simple, but it isn't.
Say I've defined a collection type with a field that's to only allow 'story' nodes to be referenced. How do I up front know whether any given node would be allowed or not? It might sound like an easy thing, but consider it also might be a view that have 10 different filters. Nevermind the performance impact, there's really no way to do it generally. Someone might make a new nodereference field tomorrow that allows or denies adding of nodes on entirely different criteria. I can't remember if widgets might be able to look at the whole node, but if that's the case, we'd have to run the validation on every possible collection node.
If someone comes up with something that works decently, I might consider including it as a add-on module. But I don't see it as becoming part of Collection.
Comment #7
toemaz commentedI think I agree with Xen that the requested use case can be generally implemented in this module. Instead, I would create a contrib module which hooks into this module as a sort of API.
Comment #8
jeffam