-
Notifications
You must be signed in to change notification settings - Fork 2
Best practice: parent child entity relationships
In OpenScholar, several OS Apps use a "parent-child" type relationship for content. This means one entity type will be referenced by many entities of another type by an entity reference field. Examples are Galleries with Images, Classes (course offerings) with Class Materials, and Software Projects with Software Releases.
For example, one Software Project node (parent) may be referenced by many Software Release nodes (children). The entity reference field is attached to the Software Release node type.
To ease and simplify the development of these types of Apps, we recommend these options in your implementation:
see http://drupal.org/project/entityreference_prepopulate
Use this module to prepopulate the entity reference field on your child entities. For example, when a user creates a new Software Release for a Software Project, the Software Project's node ID automatically prepopulates the target ID of the Software Release. No more view-powered select lists! No more URL parameters!
see http://drupal.org/project/eva
When displaying the child content of your parent nodes, use eva to easily and flexibly design and place views inside your node view page.