I've installed it, now have 2 nodes that can reference each other, I reference one of the nodes from the other node type A, but the node on node type B doesn't do anything.
Is it automatic, do I need to set anything up?
Thanks
I've installed it, now have 2 nodes that can reference each other, I reference one of the nodes from the other node type A, but the node on node type B doesn't do anything.
Is it automatic, do I need to set anything up?
Thanks
Comments
Comment #2
GeraldNDA commentedI should probably have made this obvious on the description but this is a code interface for easily getting back references. It doesn't have a default formatter, so you can't see any changes (except via code), however, creating a formatter for this field is not too much work.
The reason a default formatter doesn't already exists is because it would really slow down whole application/site (it would try to render on every entity and then you'd have to go and turn it off -__-).
Check out the README for more info about how to use this as a code interface.
Consider checking out the CER Project (https://www.drupal.org/project/cer) if your goal is just to keep node entity references in sync.
I'm considering adding a default formatter sub-module, so reply if that interests you and I will definitely add a token submodule soon-ish (it's already written I just haven't posted it yet).
Comment #3
GeraldNDA commentedComment #4
demonde commentedIs it possible to have a backreference form widget on the referenced item, so I donnot need two reference fields like in CER?
Comment #5
GeraldNDA commentedYeah, you just need to define a formatter (https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-field-formatter). I would suggest writing your own because a general one gets very hairy for cases where there are lots of reverse references.
In any case, since this was a reply of interest ... I will start looking into working on a submodule that might safely provide this functionality.
Comment #6
demonde commentedThat would be great.
Comment #7
demonde commentedActually what I am looking for is a dummy field on passive reference such as this widget of the Dr7 relation module
https://www.drupal.org/node/1276338
Comment #8
GeraldNDA commentedYou could use the Dr8 module for relations ... but I'm not sure if I understand what you are looking for ...
Comment #9
demonde commentedThere will be no Drupal 8 version of relation.
My use case is similar to using Correspondig entity references but without the need to set up two fields.
So I can have a reference field form widget at the reference that is pointed on.
E.g. entity A is referencing entity B with an entity reference field.
I can set up a new reference from A to B from B.
This is the same approach as the dummy field. You could call it a passive reference widget.
Comment #10
demonde commentedMy use case is setting up an entity "relations" with a bundle "relationship" with the ECK module.
This bundle has the fields
* Entity Reference A to node type "project"
* Entity Reference B to node type "person"
* Relation Type field with values such as "Project Member" or "Target Group"
I would like to set up the references from the target entities "project" and "person" without having to set up new fields there, so the data stays in the "relationship" bundle.
The actual working alternative would be using CER and setting up additional fields, but I donnot like that approach.
Comment #11
ccshannon commentedI have a similar question, perhaps the same issue as @demonde.
I want to have a list of nodes a User has authored, and have that "authored node list" appear as an automatically-populated field in User entity.
I understand the idea of creating a Field Formatter for displaying this list of nodes, but would that somehow make the field available in Manage Fields or Manage Display?
Or, would there be additional work to make it accessible in the Display modes?
Thanks.
Comment #12
GeraldNDA commentedChanging this back to active and renaming to match the work requested ...
What it should look like:
- Some dynamic reference formatters were ported over for use in this module
- You can create new reverse reference formatters if you so please
- You can enable/change the display mode for reverse references in the UI etc. (by default it is off)
- Since this is similar to dynamic references, you can take advantage of some of those techniques i.e.
dynamic_entity_reference_entity_viewto have different formatters for different entity types- New/changed dynamic reference formatters will not work for this module. Unless someone can convince me otherwise, I think this is the better choice.
Comment #14
GeraldNDA commentedStill need to update the readme ... but that should come shortly.
Please try the dev version to see if this is any good.
Comment #16
GeraldNDA commentedI'm marking this fixed and will close this soon unless there's any other comments :)