via the entity property info API we have knowledge about entity relationships (independently from any schema). Let's expose this as a CTools relationships also?

We should make sure we do not duplicate any existing ctools relationships though. Not sure whether we can do this with CTools' API? Worst case, we could still make it opt-in only by only providing this if a special flag is set in the entity references' property info.

Files: 
CommentFileSizeAuthor
#7 d7_entity_ctools_relationship.patch6 KBfago
PASSED: [[SimpleTest]]: [MySQL] 628 pass(es).
[ View ]
#6 d7_entity_ctools_relationship.patch6 KBfago
PASSED: [[SimpleTest]]: [MySQL] 628 pass(es).
[ View ]

Comments

How to make this generic? Some entities does not have bundles.. it seems we need 2 kinds of relations.
When referenced entity have bundle we should provide a settings form and defaults.

Does CTools even handle bundles? Isn't exposing the entity reference enough?

Probably enough but all ctools' shipped plugins are have custom plugins/implementations for that purpose (choose a bundle)

For anyone else who finds this issue, andypost's patch in #1011370 may help sites as a temporary solution until this one is resolved.

Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new6 KB
PASSED: [[SimpleTest]]: [MySQL] 628 pass(es).
[ View ]

ok, took a stab on this. Here is a general plugin that allows one to expose *any kind* of selected data based on the metadatawrappers - quite useful as you don't have to write custom relationship plugins for all that supported stuff any more :-)

StatusFileSize
new6 KB
PASSED: [[SimpleTest]]: [MySQL] 628 pass(es).
[ View ]

Small update to better deal with empty lists.

Note: This works great with #2180775: Allow views argument from context to make use of context arguments to handle multiple-valued contexts as views arguments.

Is this supposed to solve https://drupal.org/node/1011370 instead of the patch that was proposed there?

If so, when will it be committed here and could there be an update in the other issue queue?

I believe that there are a number of people who have been waiting for a way to integrate profile2 and panels and it would be helpful to commit and document a workable, stable, solution.

Thanks.

Yeah, it's an alternative to #1011370: Ctools relationship from user - it's more powerful but provides worse UX. So we might want to add #1011370: Ctools relationship from user as well.