There is zero D8 documentation for this module.

I have no idea how to use it, after being recommended it to help me output an entity referenced field twice in my twig template, with different display modes.

Can anyone point me in the direction of any form of D8 documentation?

Comments

paul_canning created an issue. See original summary.

ahebrank’s picture

It's the same UI as with prior Drupal versions: install module, create a View, add a new display for the View of type "EVA", and in that display config attach it to an entity type / bundles (required options so you won't be able to save the View until you do). You'll then add or remove the new Eva extra field from the various display modes for the entity bundle(s) (adding or removing depending on whether they're configured already or not). In the entity display template you'll then need to figure out the $content key, which is something like {{ content.viewid_displayid }}

The tutorial linked on the project page is relevant; he talks about EVA starting around 5:30. This post has screenshots of what the View display and entity display mode configuration looks like.

However... if this is a custom theme and you want to just drop a View in a template (not concerned about UI control over the entity display config), it might be easier to use {{ drupal_view() }} out of the twig_tweak module.

paul_canning’s picture

See, there is the same problem, Twig Tweak has zero useful documentation. The cheat sheet is a pile of crap and it explains nothing. I see people recommend it, but there are no examples and /or explanations.

The fact remains, there is no documentation for this module. Nothing meaningful anyway.

ahebrank’s picture

Priority: Critical » Normal

I think the standard answer/attitude is that if you feel something is missing, the primary burden is on you, as a participant in the contrib ecosystem, to create it. The prevailing approach to contrib development is I'm-not-paid-to-do-this-let's-just-get-it-done-so-we-can-make-it-work-for-our-client-site, and in that model documentation is an afterthought or at best assumes a lot of prior knowledge. Contributors are also accustomed to synthesizing info from API autodocs, Drupalcon videos, video tutorials, and stackexchange answers when they're trying to figure something out, so it might not even occurs to them how to write documentation for new users.

If you are able document the process of learning to use this module, that would certainly be helpful to other new users, and I'd be happy to help you get that posted and linked from the project page.

For the above reasons, I agree there's very little organized, coherent documentation for nearly any aspect of Drupal and until you have a pretty good familiarity with the various Drupal APIs certain things might just not click. Knowledge of basic twig syntax, how content and config entities are identified by ID and display ID, and how contextual arguments are passed to the View are generally skipped over, and that's either because some level of understanding is assumed, or more insidious: people are generally nervous about exposing gaps in their own knowledge when they've been using something for a while, and even worse, might be masking that with an attitude of "I suffered through all this, so should you!"

(Here's a tutorial using twig_tweak function to place a View in a template: https://www.youtube.com/watch?v=7UlGAeKYoa8)