Closed (duplicate)
Project:
Entity Reference View Widget
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2011 at 06:49 UTC
Updated:
30 Jan 2013 at 10:53 UTC
Comments
Comment #1
sreese commentedSeconded. It would be wonderful if we could customize the fields that are displayed by this widget in the view display.
Comment #2
bojanz commentedThis is not something I have time for right now.
If someone else wants to give it a shot, patches are welcome.
The main problem is that the left column has entities rendered using entity_view(), while the right column has entities from a View. So the new approach would need to have an embed view in the left sidebar.
That said, you can already control which fields get displayed through the "Manage Display" tab of the Field API for the entity type you're displaying (if it's nodes, then it's in Admin -> Structure -> Content Types, etc)
Comment #3
7wonders commentedAnd if you want to slim it down to the bare minimum you can create your own .tpl for entityreference_view_widget. Add to your template.php in your theme:
Now you can create node--YOURCONTENTTYPE--evw.tpl.php. In mine I have placed:
Which prints only the node title and the checkbox (as I disabled all other fields on the Manage Display settings).
Comment #4
mrpauldriver commentedA table view with a select box would be most useful for the right column, I'm not too bothered what the left column does.
Comment #5
davidseth commentedI have created a new module that allows for much more flexibility in creating the view. You can use the table view layout and add any addition fields you want. It also is much more light-weight in its implementation with less ajax calls back to Drupal.
I made my module due to a large Drupal site I was working on, the Entity Reference View Widget just wasn't scaling due to all the form processing it was doing along with every click being a big ajax call. I did base parts of my module on Entity Reference View Widget and it would be interesting to see if some of these things could be merged back into this project.
It is currently in a sandbox: http://drupal.org/sandbox/davidseth/1489176. You will have to check out the 7.x-1.x branch.
Comment #6
bojanz commentedI'll take a look as soon as possible.
Entity Reference View Widget is far from ideal (it is a giant hack basically), and I'm very interested in exploring alternatives.
Comment #7
bojanz commentedThere's now code in #1309632: Add checkbox field to select/deselect entities.