One field (entity reference - paragraph) with two display modes I am having issue with displaying one field twice in my template having different display modes.

I have a content type basic page with field field_gallery (which is entity reference on paragraph). In template node--page--full.html.twig I want to render field_gallery twice. Once using default display mode and second using teaser.

&lt;div class="container"&gt;
    {# this as teaser #}
    {{ content.field_gallery }} 

    {# this as default or whatever #}
    {{ content.field_gallery }}
&lt;/div&gt;


I tried do it using hook_preprocess_node, but could not achieve the result I want.

$variables['custom_display_mode'] = $variables['node']-&gt;get('field_gallery')
    -&gt;view(array(
       'label' =&gt; 'hidden',
       'type' =&gt; 'teaser'
));


I do not want to use any custom module, I'm kinda new to drupal hooks and i'm sure that it must be possible somehow, to set custom variable and print it in my template.

Thanks.
An array with 'type' =&gt; 'teaser' is specifying a field formatter, but you probably don't have a field formatter with this name.

You need to add the view mode (display mode) as string argument to view():. 

$variables['custom_display_mode'] = $variables['node']-&gt;get('field_gallery')
  -&gt;view('teaser');


For more info see How to apply a Field Formatter to a node field programmatically?