I made a patch to group items in a views select widget. Saw there was a comment about using the grouping data, and i had a use for it on my end, so here we are.
| Comment | File | Size | Author |
|---|---|---|---|
| nodereference.patch | 3.72 KB | corey.aufang |
I made a patch to group items in a views select widget. Saw there was a comment about using the grouping data, and i had a use for it on my end, so here we are.
| Comment | File | Size | Author |
|---|---|---|---|
| nodereference.patch | 3.72 KB | corey.aufang |
Comments
Comment #1
corey.aufang commentedbtw, if this goes well, was planning on porting this to the updated userreference module as well
Comment #2
yched commentedCool - does the autocomplete widget still work correctly with this ?
Comment #3
corey.aufang commentedYeah, it still works. When I was first testing the autocomplete changes I had to made, I thought it was broken due to the "[nid:#]", but that is correct.
Comment #4
corey.aufang commentedjust wondering if there was any more info on the status of this
Comment #5
corey.aufang commentedComment #6
yched commentedYes, sorry for not getting back at this.
Last time I tried, the patch did seem to play well for autocomplete widgets.
Also, I' really not sure of the best way to do this. If _nodereference_potential_references_views() returns a 'grouped' array, then it means _nodereference_potential_references_standard() has to return the same format, and all consumers of nodereference_allowed_values() have to deal with this new format. A feature in one use case (grouped views for noderef fields using the 'views' mode and the select list widget) affects the whole chain - tricky.
That's why I left this part as a later TODO when adapting the 'views mode' to Views2.
Comment #7
corey.aufang commentedYeah, I didn't like what I had to do to so many functions to make it work correctly. If someone else doesn't come up with a more elegent solution, I'll revisit this when cck and views release. Thanks for the reply.