Prezi

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in the manual

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Entity References and Relationships

How to create love and harmony amongst entities of all kinds.
by Chris Miller on 13 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Entity References and Relationships

History &
Similar Modules
Creating Relationships
Music Site Example
Recipes for love and harmony among entities of all types
What?
Entity Reference and similar modules allow us to create a hierarchy of entities, including nodes, users, files, etc...
Nice UI Tricks
Common patterns for
relationships and references.
Entity Reference supports Views contextual filters (aka arguments), and Views relationships (similar to a database table join).
Views and References
Draggable Views
Management Tabs
Entity Reference Prepopulate
Questions?
Views and other 'glue' modules enable complex site building without writing code. (Usually)
The concept of references has been evolving since at least Drupal 4.x, starting with CCK
Node and user references
were part of CCK in D4 and D5
https://drupal.org/project/entityreference
https://drupal.org/project/references
https://drupal.org/project/relation
Entity Reference in D7
Moved to References in D6
Parent reference on child node.
Easiest UI and views integration.
or
Child reference on parent node. Good for multi-value.
UI and views are more complicated.
or
Corresponding Entity Reference module syncs both ways.
https://drupal.org/project/cer
Entity Reference
Entity Views Attachment
Entity Reference Prepopulate
Views
Draggableviews
Media Element
Entity Views Attachment
Add contextual filters to select nodes based an entity reference field's value, typically specified as part of the view's URL.
Add relationships to display fields that are part of referenced nodes.
Gives control over the admin interface. Selection of fields, etc...
Capable of managing
parent-child relationships
like a nested folder-like structure.
Draggableviews order can be shared among views displays with the identical arguments.
Create a dedicated UI for
managing child entities using views.
Add a contextual filter with a default value provided by content ID.
Set the view path to 'node/%/mytab'
Menu item type = Menu tab
Add entity type validation on contextual filter to control visibility of tab.
A quick demo featuring
Artists, Albums, Tracks
Eases creation of related entity display.
Appears as an extra field
on the node->display page.
Populates reference field from a URL parameter.
Parameter format: ?field_myfield=entityid
Enabled and configured on field settings page.
Entity Reference Cascade Delete
https://drupal.org/project/ercd

By Chris Miller
chris@trailheadinteractive.com
https://drupal.org/project/eva
https://drupal.org/project/draggableviews
https://drupal.org/project/entityreference_prepopulate
94,913
85,030
6,191
See the full transcript