1 / 16

User Friendly Entity Reference Select Lists

User Friendly Entity Reference Select Lists. Using Views, Views Entity View Widget, and References Dialog. Hello there!. My name is Chris Hoffman (hoff331 on Drupal.org ) Graphic Designer and Front-end Developer (yes, I know I am using PowerPoint) Working with Drupal for 3 Years

finn
Download Presentation

User Friendly Entity Reference Select Lists

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User Friendly Entity Reference Select Lists Using Views, Views Entity View Widget, and References Dialog

  2. Hello there! • My name is Chris Hoffman(hoff331 on Drupal.org) • Graphic Designer and Front-end Developer (yes, I know I am using PowerPoint) • Working with Drupal for 3 Years • Find me and my work atwww.GetJumpstartNow.com(available for freelance)

  3. Situation(3 assumptions) • User has to create a node (Concert) that references another node (Performers) • Referenced node type (Performers) hasa lot of nodes (i.e. options) • We want to provide the user with an user-friendly way to find/select referenced nodes

  4. Preview Site • Performer Content Typetitlebodymusical genre (taxonomy) • Concert Content Typetitlebodyperformers (entity reference)

  5. Our Options(modules) • Views (Entity Reference View Display) • Entity Reference View Widget • Reference Dialog • Others not covered… Multiple Selects, Chosen, Dynamic Multiselect, etc. Each one has positives and negatives!

  6. Option 1: Views Positives • Entity Reference comes with a view display • Great for filtering lists of referenced nodes(before the options before user sees them) • Great for adding node fields to select optionsex.) <option>Performer – genre</option> • Pass arguments from node to view(not covered) Negatives • Cannot group content (i.e. by genre) • Cannot use exposed filters

  7. How To • Create an “Entity Reference” view display • Filter, sort, etc. view as normal • Select view in Entity Reference Field settings • Pass in additional arguments

  8. Demo Views

  9. Option 2: Ent. Ref.View Widget Positives • Also great for filtering and adding content to select options • Able to Group nodes • Great for e-Commerce Negatives • Hard to style – the view renders the node, the rendered node is controlled via the display manager (to customize display use .tplor similar)

  10. How To • Configure “Ent. Ref. View Widget” view mode (i.e. full, teaser, etc.) via display manager • Create an “Ent. Ref. View Widget” view display • Filter, sort, etc. view as normal • Select view in Entity Reference Field settings(this will override settings below)

  11. Demo Ent. Ref.Views Widget

  12. Option 3:Reference Dialog Positives • Allows for inline entity creation combined with automatic entity reference (not possible using IEF) • Allows for inline entity editing • Search Dialog page (created using views) can be formatted, filtered, and grouped Negatives • Module is a bit buggy (still in alpha) • Requires lots of styling to make Search Dialog page effective

  13. How To • Set entity reference field to Autocomplete widget • Select which “dialogs” to add to field(Edit, Add, and/or Search) • If “Search Dialog” enabled, you must createa “Reference dialog Search” view display • Associate the view to entity reference field • Filter, sort, etc. view as normal

  14. DEMO Reference Dialog

  15. Other Options • Multiple Selects • Chosen • Dynamic Multiselect • See article by Lullabot:http://www.lullabot.com/blog/articles/entityreference-multiselectors

  16. Questions?

More Related