Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
How can i use (ONLY) Add link for a field_collection field within a view?
I have no success either to display with fieled collection data list (or view).
Comment | File | Size | Author |
---|
Comments
Comment #1
tim.plunkettPostponed on #1047784: [Meta] Views Integration for field collection.
Comment #2
vasikeit seems that related issue it's already fixed but didn't fixed the present one.
Comment #3
mrfelton CreditAttribution: mrfelton commentedAlso need views field handlers for Add, Edit, and Delete fields - that should only show based on user permissions.
Comment #4
mrfelton CreditAttribution: mrfelton commentedAttached patch adds new views handlers that provide Edit and Delete links for field collection items.
Comment #5
mrfelton CreditAttribution: mrfelton commentedFix whitespace issues.
Comment #6
jerdavisHere is a different approach which more closely follows what Views itself is doing for similar action links for Nodes.
Comment #7
bulldozer2003Thank you!
Another note is that you should not create a label in views for the links as the label will be shown to unprivileged users while the link is properly hidden.
Comment #8
bulldozer2003If you are only displaying a single node's field collection items, another tip is to exclude the add item link from display. Then add a footer with the following global unfiltered text with "use replacement patterns" checked.
If you don't exclude add item from display, it will be displayed in every field collection item.
Comment #9
fagoThose handlers should leverage the views' views_handler_field_enttiy (or how it is called), such as the node links do in View. Check them for example.
I do no think we should directly extend the node-link handlers. Semantically it doesn't make sense and I don't think it would bring us much.
Comment #10
jerdavis@Fago #6 doesn't extend the node link handlers, did you take a look at it?
Comment #11
lathanReroll against latest dev.
Comment #12
mrfelton CreditAttribution: mrfelton commentedPatch from #6 updated against dev again
Comment #13
Chris Matthews CreditAttribution: Chris Matthews commentedThe patch in #12 no longer applies to the latest 7.x-1.x-dev and may be too old to easily reroll, but I went ahead and tagged the issue accordingly.