Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I saw a few Q&As here referring to the EVA module. Is there a good step by step instruction on how to use it? Should it even be used or are there better ways to get the same output (for example showing a product detail page and a list of the top 10 reviews below)

share|improve this question

closed as off-topic by Mołot, kenorb, Krishna Mohan, Елин Й., Chapabu Dec 29 '15 at 2:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking to recommend or find a book, tool, module, theme, distribution, tutorial, or other off-site resource are off-topic for Drupal Answers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Mołot, kenorb, Krishna Mohan, Елин Й., Chapabu
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is a request for tutorials, and other online resources, as defined in help center. – Mołot Nov 6 '13 at 8:21
up vote 23 down vote accepted

The module's description can be read as a concise tutorial, but other than that, I have not seen a tutorial. So here it comes.

First, you need to create a view (or take an existing one) and add an "Entity content" display to it using the [+Add] button on the top left. When you configure the view, you will see the 'Entity content settings'. They control to which entities the view is attached and which information from that entity is passed to the view as an argument. For instance, you can use the [node:author:uid] token to get the author uid from the node and use it to filter the view by that uid. I exported the test view I made (see the code below) so you can import it again and give it a try. It attaches to the 'article' content type and generates a list of nodes of the same author.

Once you have set up your view, go to the 'Manage fields' page of the node type you attached the view to (eg. example.com/admin/structure/types/manage/article/display). There you can control where the view should appear in your node.

I think that EVA is a good way to achieve this result. It was written by two of Drupal's top contributors and it's predecessor is used on more than 17000 sites - I guess that means something.

View export:

$view = new view;
$view->name = 'eva_test';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'eva_test';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'More by this author';
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: User: Uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'users';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['uid']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['uid']['break_phrase'] = 0;
$handler->display->display_options['arguments']['uid']['not'] = 0;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/* Display: Entity content */
$handler = $view->new_display('entity_view', 'Entity content', 'entity_view_1');
$handler->display->display_options['entity_type'] = 'node';
$handler->display->display_options['bundles'] = array(
  0 => 'article',
$handler->display->display_options['argument_mode'] = 'token';
$handler->display->display_options['default_argument'] = '[node:author:uid]';
$handler->display->display_options['show_title'] = 1;
$translatables['eva_test'] = array(
  t('More by this author'),
  t('Sort by'),
  t('Items per page'),
  t('- All -'),
  t('Entity content'),
share|improve this answer
excellent, thanks so much for the help. Now I see why this is a such a handy module! – MotoTribe Jun 28 '11 at 4:46
Just a heads up Entity Content is now known as EVA Field. This should save someone some seconds of searching. Cheers. – Bernard Nandwa Jun 19 '13 at 7:57

I just want to include a screen caption of the EVA view. You need to be able to see the "ENTITY CONTENT SETTINGS" section. It works for some people and not others.

I also want to emphasize that the argument doesn't need the setting "Provide default argument." Under contextual filter, argument settings the other four settings will work and the value is like the other answer says provide by the EVA settings of the View.

enter image description here

share|improve this answer

Here's a tip: remember that if you switch on a contextual link in the Advanced area to something like Current User ID, you should switch off the 'Arguments' (set by default to 'id') under 'ENTITY CONTENT SETTINGS', otherwise you won't get the records you want in your EVA field.

share|improve this answer

For a helpful usecase and lots of info in the comments that follow, I suggest this video is great supplemental material: http://torontowebsitedeveloper.com/drupal-video-tutorials/drupal-7-node-reference-tutorial

Included in the comments is a suggestion about a reverse lookup. Between this answer and that video post, I think the topic is nicely covered, so I hope nobody minds me cross-referencing them.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.