10

I've been trying to find an answer but any search for views embed display brings up a bunch of unrelated modules and questions.

There is a Views Display Type/Mode/Whatever called "Embed" that you select when creating different views in your view:

views embed display

For what can I use this display type?

1 Answer 1

11

This is a display which can be embedded via views_embed_view() or drupal_view() of Twig Tweak.

You can embed other display types, too, for example Page or Block, but the first one generates a route and the second one a block derivate you see when adding blocks to the block layout. So Embed is basically a display type which does nothing until you embed it in code.

The only explanation you can find in Views UI is in the general settings, where there is this checkbox:

[x] Allow embedded displays

Embedded displays can be used in code via views_embed_view().

Which by the way is without function and there is an open issue to remove it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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