SlideShare a Scribd company logo
1 of 24
Building a Bibliography
Via Entity References and Views
Thursday, June 27, 13
Bio
Eric Aitala
Earth and Space Science
Partnership - College of
Earth & Mineral Science
ema13@psu.edu
@aitala
Drupal dev since 2006
Thursday, June 27, 13
Entities
Introduced in D7
An entity is a collection of information which is fieldable.
Examples
Node
Comments
Users
Taxonomy vocabulary & taxonomy term
File
Thursday, June 27, 13
Entities
Entity Type - Node, User, File
Bundle - Article, Basic Page
Field(s) - Body, text field, date field
Entity - A specific instance of an entity type or bundle
i.e. example.com/node/27
Stores data (properties) in the database.
Fields provide additional properties to extend the default
bundle(s).
Thursday, June 27, 13
Entities
More information at:
https://drupal.org/node/1261744
http://www.slideshare.net/jdleonard/entities-in-drupal-7-
the-entity-api
Thursday, June 27, 13
Citation Example
A publication
Contains a title,
author(s), an abstract,
a publication date, etc.
Why not use Biblio
module? Its wonky...
Create a content type
for it....
Thursday, June 27, 13
Author Field
The author field can be
quite complicated...
Thursday, June 27, 13
Author Field
If I was in a hurry...
Plain text field
Infinite instances
Thursday, June 27, 13
But.....
... you may not get
what you expect.
I’ve done this once....
... bad idea.
Thursday, June 27, 13
There is a better way...
Thursday, June 27, 13
Entity Reference
Entity reference module
https://drupal.org/project/entityreference
It provides a field which allows one entity to refer to
another... aka, a specific node can point, via a link for
example, to another node.
Integrates with Views, Feeds, and Migrate module
Thursday, June 27, 13
Citation Example, v2
Instead of having a plain text field, create two content
types
Citation
Title, abstract, etc.
Citation Author
Name, degrees, affiliation, etc.
Then have the Citation do an Entity Reference to the
Citation Author(s)
Thursday, June 27, 13
Citation Example, v2
Thursday, June 27, 13
Citation Example, v2
Add a field to the Citation type to the Citation Author
type.
Thursday, June 27, 13
Citation Example, v2
Thursday, June 27, 13
Citation Example, v2
In my real world case, I have the Citation type refer to
Citation Author type which in turn may refer to a User
entity!
Thursday, June 27, 13
Demo time....
Thursday, June 27, 13
Modules
Entity API
Functionality not included in D7 core
CRUD functionality, etc. (You really need this module!)
https://drupal.org/project/entity
Entity Reference
https://drupal.org/project/entityreference
Entity Reference Dynamic Select Widget
https://drupal.org/project/entityreference_dynamicselect_widget
References dialog - adds the create & edit inline links
https://drupal.org/project/references_dialog
Thursday, June 27, 13
Now... Views....?
How do we handle
things like entity
references in Views?
Under the Views
‘Advanced’ tab...
Contextual Filter
Relationships
Thursday, June 27, 13
Now... Views....?
Contextual Filter
“Contextual Filters (known in previous versions of
Views as "Arguments") are input. While they often
come from the URL, they don't always. Don't be
shocked when they don't. Each display type may
have its own source for contextual filters.”
Thursday, June 27, 13
Now... Views....?
Relationships
“Relationships allow you to expand the query to
include objects other than the base query.”
“The main example of the relationship that is there by
default is the node --> user relationship; every node
has an author, and if a node is in the query, the user
who wrote that node is automatically made
available.”
Thursday, June 27, 13
Now... Views....?
Relationships
“A similar relationship that is not automatically made
available is for node revisions. Each revision has its
own author, which is the user who made the revision.
By adding the "Node revision: User" relationship, all
of the 'user' fields, sorts, filters and arguments
available to a user will now be available for the
revision author.”
Thursday, June 27, 13
What does that mean?
Contextual Filter
Has query/filter terms in the URL (usually)
http://example.com/events/2013/6/25
Relationships
Exploit a default relationship - node and node author
Create a relationship between entities - a file and the
node it is attached to, or vice versa
Thursday, June 27, 13
Demo time....
Thursday, June 27, 13

More Related Content

Viewers also liked

State Report Ashley
State Report AshleyState Report Ashley
State Report Ashleyjabernethy
 
Online Presence
Online PresenceOnline Presence
Online Presencecccowman
 
Directori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDirectori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDavid Rozas
 
Drupal para bibliotecas, archivos y lo que sea menester
Drupal para bibliotecas, archivos y lo que sea menesterDrupal para bibliotecas, archivos y lo que sea menester
Drupal para bibliotecas, archivos y lo que sea menesterSocialBiblio
 

Viewers also liked (7)

State Report Ashley
State Report AshleyState Report Ashley
State Report Ashley
 
Online Presence
Online PresenceOnline Presence
Online Presence
 
Directori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDirectori català de l’economia col·laborativa
Directori català de l’economia col·laborativa
 
Wolves
WolvesWolves
Wolves
 
Yt 39
Yt 39Yt 39
Yt 39
 
Yamada 105
Yamada 105Yamada 105
Yamada 105
 
Drupal para bibliotecas, archivos y lo que sea menester
Drupal para bibliotecas, archivos y lo que sea menesterDrupal para bibliotecas, archivos y lo que sea menester
Drupal para bibliotecas, archivos y lo que sea menester
 

Similar to Building a Bibliography

The Eprints Application Profile: a FRBR approach to modelling repository meta...
The Eprints Application Profile: a FRBR approach to modelling repository meta...The Eprints Application Profile: a FRBR approach to modelling repository meta...
The Eprints Application Profile: a FRBR approach to modelling repository meta...Julie Allinson
 
Drupal 7 entities & TextbookMadness.com
Drupal 7 entities & TextbookMadness.comDrupal 7 entities & TextbookMadness.com
Drupal 7 entities & TextbookMadness.comJD Leonard
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS DirectivesChristian Lilley
 
Eprints Special Session - DC-2006, Mexico
Eprints Special Session - DC-2006, MexicoEprints Special Session - DC-2006, Mexico
Eprints Special Session - DC-2006, MexicoEduserv Foundation
 
Dublin Core Application Profile for Scholarly Works (ePrints)
Dublin Core Application Profile for Scholarly Works (ePrints)Dublin Core Application Profile for Scholarly Works (ePrints)
Dublin Core Application Profile for Scholarly Works (ePrints)Julie Allinson
 
Dublin Core Application Profile for Scholarly Works Slainte
Dublin Core Application Profile for Scholarly Works SlainteDublin Core Application Profile for Scholarly Works Slainte
Dublin Core Application Profile for Scholarly Works SlainteJulie Allinson
 
Resource discovery and information sharing: reaching the 2.0 turn
Resource discovery and information sharing: reaching the 2.0 turnResource discovery and information sharing: reaching the 2.0 turn
Resource discovery and information sharing: reaching the 2.0 turnBonaria Biancu
 
Repositories and the wider context
Repositories and the wider contextRepositories and the wider context
Repositories and the wider contextJulie Allinson
 
Repositories thru the looking glass
Repositories thru the looking glassRepositories thru the looking glass
Repositories thru the looking glassEduserv Foundation
 
OOP programming for engineering students
OOP programming for engineering studentsOOP programming for engineering students
OOP programming for engineering studentsiaeronlineexm
 
A Dublin Core Application Profile for Scholarly Works (eprints)
A Dublin Core Application Profile for Scholarly Works (eprints)A Dublin Core Application Profile for Scholarly Works (eprints)
A Dublin Core Application Profile for Scholarly Works (eprints)Julie Allinson
 
Entities, Bundles, and Fields: You need to understand this!
Entities, Bundles, and Fields: You need to understand this!Entities, Bundles, and Fields: You need to understand this!
Entities, Bundles, and Fields: You need to understand this!tedbow
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1Asad Khan
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
Dcap Ja Progmeet 2007 07 05
Dcap Ja Progmeet 2007 07 05Dcap Ja Progmeet 2007 07 05
Dcap Ja Progmeet 2007 07 05Julie Allinson
 
Swap For Dummies Rsp 2007 11 29
Swap For Dummies Rsp 2007 11 29Swap For Dummies Rsp 2007 11 29
Swap For Dummies Rsp 2007 11 29Julie Allinson
 
SWAP : A Dublin Core Application Profile for desribing scholarly works
SWAP : A Dublin Core Application Profile for desribing scholarly worksSWAP : A Dublin Core Application Profile for desribing scholarly works
SWAP : A Dublin Core Application Profile for desribing scholarly worksJulie Allinson
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
Happy Content Creators
Happy Content CreatorsHappy Content Creators
Happy Content CreatorsEric Aitala
 

Similar to Building a Bibliography (20)

The Eprints Application Profile: a FRBR approach to modelling repository meta...
The Eprints Application Profile: a FRBR approach to modelling repository meta...The Eprints Application Profile: a FRBR approach to modelling repository meta...
The Eprints Application Profile: a FRBR approach to modelling repository meta...
 
Drupal 7 entities & TextbookMadness.com
Drupal 7 entities & TextbookMadness.comDrupal 7 entities & TextbookMadness.com
Drupal 7 entities & TextbookMadness.com
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS Directives
 
Eprints Special Session - DC-2006, Mexico
Eprints Special Session - DC-2006, MexicoEprints Special Session - DC-2006, Mexico
Eprints Special Session - DC-2006, Mexico
 
Dublin Core Application Profile for Scholarly Works (ePrints)
Dublin Core Application Profile for Scholarly Works (ePrints)Dublin Core Application Profile for Scholarly Works (ePrints)
Dublin Core Application Profile for Scholarly Works (ePrints)
 
Dublin Core Application Profile for Scholarly Works Slainte
Dublin Core Application Profile for Scholarly Works SlainteDublin Core Application Profile for Scholarly Works Slainte
Dublin Core Application Profile for Scholarly Works Slainte
 
Resource discovery and information sharing: reaching the 2.0 turn
Resource discovery and information sharing: reaching the 2.0 turnResource discovery and information sharing: reaching the 2.0 turn
Resource discovery and information sharing: reaching the 2.0 turn
 
Repositories and the wider context
Repositories and the wider contextRepositories and the wider context
Repositories and the wider context
 
Eprints Application Profile
Eprints Application ProfileEprints Application Profile
Eprints Application Profile
 
Repositories thru the looking glass
Repositories thru the looking glassRepositories thru the looking glass
Repositories thru the looking glass
 
OOP programming for engineering students
OOP programming for engineering studentsOOP programming for engineering students
OOP programming for engineering students
 
A Dublin Core Application Profile for Scholarly Works (eprints)
A Dublin Core Application Profile for Scholarly Works (eprints)A Dublin Core Application Profile for Scholarly Works (eprints)
A Dublin Core Application Profile for Scholarly Works (eprints)
 
Entities, Bundles, and Fields: You need to understand this!
Entities, Bundles, and Fields: You need to understand this!Entities, Bundles, and Fields: You need to understand this!
Entities, Bundles, and Fields: You need to understand this!
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Dcap Ja Progmeet 2007 07 05
Dcap Ja Progmeet 2007 07 05Dcap Ja Progmeet 2007 07 05
Dcap Ja Progmeet 2007 07 05
 
Swap For Dummies Rsp 2007 11 29
Swap For Dummies Rsp 2007 11 29Swap For Dummies Rsp 2007 11 29
Swap For Dummies Rsp 2007 11 29
 
SWAP : A Dublin Core Application Profile for desribing scholarly works
SWAP : A Dublin Core Application Profile for desribing scholarly worksSWAP : A Dublin Core Application Profile for desribing scholarly works
SWAP : A Dublin Core Application Profile for desribing scholarly works
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
Happy Content Creators
Happy Content CreatorsHappy Content Creators
Happy Content Creators
 

Recently uploaded

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 

Recently uploaded (20)

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 

Building a Bibliography

  • 1. Building a Bibliography Via Entity References and Views Thursday, June 27, 13
  • 2. Bio Eric Aitala Earth and Space Science Partnership - College of Earth & Mineral Science ema13@psu.edu @aitala Drupal dev since 2006 Thursday, June 27, 13
  • 3. Entities Introduced in D7 An entity is a collection of information which is fieldable. Examples Node Comments Users Taxonomy vocabulary & taxonomy term File Thursday, June 27, 13
  • 4. Entities Entity Type - Node, User, File Bundle - Article, Basic Page Field(s) - Body, text field, date field Entity - A specific instance of an entity type or bundle i.e. example.com/node/27 Stores data (properties) in the database. Fields provide additional properties to extend the default bundle(s). Thursday, June 27, 13
  • 6. Citation Example A publication Contains a title, author(s), an abstract, a publication date, etc. Why not use Biblio module? Its wonky... Create a content type for it.... Thursday, June 27, 13
  • 7. Author Field The author field can be quite complicated... Thursday, June 27, 13
  • 8. Author Field If I was in a hurry... Plain text field Infinite instances Thursday, June 27, 13
  • 9. But..... ... you may not get what you expect. I’ve done this once.... ... bad idea. Thursday, June 27, 13
  • 10. There is a better way... Thursday, June 27, 13
  • 11. Entity Reference Entity reference module https://drupal.org/project/entityreference It provides a field which allows one entity to refer to another... aka, a specific node can point, via a link for example, to another node. Integrates with Views, Feeds, and Migrate module Thursday, June 27, 13
  • 12. Citation Example, v2 Instead of having a plain text field, create two content types Citation Title, abstract, etc. Citation Author Name, degrees, affiliation, etc. Then have the Citation do an Entity Reference to the Citation Author(s) Thursday, June 27, 13
  • 14. Citation Example, v2 Add a field to the Citation type to the Citation Author type. Thursday, June 27, 13
  • 16. Citation Example, v2 In my real world case, I have the Citation type refer to Citation Author type which in turn may refer to a User entity! Thursday, June 27, 13
  • 18. Modules Entity API Functionality not included in D7 core CRUD functionality, etc. (You really need this module!) https://drupal.org/project/entity Entity Reference https://drupal.org/project/entityreference Entity Reference Dynamic Select Widget https://drupal.org/project/entityreference_dynamicselect_widget References dialog - adds the create & edit inline links https://drupal.org/project/references_dialog Thursday, June 27, 13
  • 19. Now... Views....? How do we handle things like entity references in Views? Under the Views ‘Advanced’ tab... Contextual Filter Relationships Thursday, June 27, 13
  • 20. Now... Views....? Contextual Filter “Contextual Filters (known in previous versions of Views as "Arguments") are input. While they often come from the URL, they don't always. Don't be shocked when they don't. Each display type may have its own source for contextual filters.” Thursday, June 27, 13
  • 21. Now... Views....? Relationships “Relationships allow you to expand the query to include objects other than the base query.” “The main example of the relationship that is there by default is the node --> user relationship; every node has an author, and if a node is in the query, the user who wrote that node is automatically made available.” Thursday, June 27, 13
  • 22. Now... Views....? Relationships “A similar relationship that is not automatically made available is for node revisions. Each revision has its own author, which is the user who made the revision. By adding the "Node revision: User" relationship, all of the 'user' fields, sorts, filters and arguments available to a user will now be available for the revision author.” Thursday, June 27, 13
  • 23. What does that mean? Contextual Filter Has query/filter terms in the URL (usually) http://example.com/events/2013/6/25 Relationships Exploit a default relationship - node and node author Create a relationship between entities - a file and the node it is attached to, or vice versa Thursday, June 27, 13