We can't get single field from field collection now.

It would be perfect if Ctools/Panels has address field context.
dd

Comments

chi’s picture

Status: Active » Needs review
StatusFileSize
new4.53 KB

Here's a patch to extract field collection context based on an existing entity context.

mikeker’s picture

Thanks for the patch! I've verified this patch allows me to set the visibility of a pane based on a field inside a field collection.

I would RTBC the patch, but I have only tested it in that limited use-case.

manuelBS’s picture

Patch works great form me, thanks for sharing!

mikeker’s picture

@manualBS, can you give us some details on the specifics of your case? What was broken and what did the patch fix? The more we know, the sooner we can get this to RTBC and committed to the module.

Thanks.

manuelBS’s picture

Of course, I can. I wanted to add the fields of field collection to a panel overriding node/%node. To get all the fields I need to create a ctools relationship between the node beeing viewed and the field collection. Thats it.

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

Tested this and it works great.

Makes it super simple to add those extra context.

Thanks.

timwood’s picture

This is working well for me also.

fago’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. I re-named the plugin directory to ctools and committed it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

osopolar’s picture

Issue summary: View changes
Status: Closed (fixed) » Fixed

May somebody who worked on this issue help with the "reverse" relationship plug-in to get the host entity for a given field collection item: #2567585: Ctools relationship plugin to add host entity context to field_collection panels?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.