I have two content types: Region and City, Region
node includes City
node, every City
node is related to some Region
node, how I can create relationship for this situation: when I create Region
node and refer a City
node in a field, all City
nodes have its Region
referencing field set to this Region
node and vice-versa?
Asked
Active
Viewed 59 times
0

xangy
- 1,185
- 1
- 8
- 19

Artyom Kondra
- 105
- 1
- 8
1 Answers
1
You can use Corresponding Entity References to achieve this.
Follow this steps:
- Create two content types: Region and City.
- Insert entity reference field:
Cities
in Region andRegion
in City. - Now enable Corresponding Entity References and update its configuration by going on your site: Configuration >> System >> Corresponding entity references.
- Check this configuration: Correspond Region on node(s) of type city with Cities on node(s) of type region.
- Now in next tab Updating existing entities of entity type: node.

xangy
- 1,185
- 1
- 8
- 19