I cannot find any documentation how I insert AddToAny buttons to a specific place in my custom template file. I would like to have the buttons between "Submitted on..." and the actual content.

This https://www.drupal.org/node/1323370 is for D7, but D8 is so different that I have no idea what should be done.

Any help?

Comments

ErnoVanhala created an issue. See original summary.

ErnoVanhala’s picture

Status: Active » Fixed

And of course the answer was easy.

<div class="some-sharing-links">
  {{ content.addtoany }}
</div>
<div{{ content_attributes.addClass('content') }}>
  {{ content|without('addtoany') }}
</div>

Does the job in e.g. node-page.html.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Nitish k’s picture

Use {{ content.addtoany }} wherever you want to display the Add to Any Social share button.