0

I have two custom library blocks for the footer of a website I am developing. The idea is that admins may change the footer quite freely with a wysiwyg editor without any theme changes.

The problem is that I don't find any way to use only the contents of the custom library blocks (without the Drupal generated layout destructing code) in the footer twig.

Am I trying to do something impossible or just missing something obvious?

wbr

hank

  • Is the question “how do I remove the wrapping markup from rendered blocks”? Or something more subtle? – Clive Feb 14 '18 at 10:04
2

Use Twig Tweak and

{{ drupal_entity('block_content', 123) }}

This renders only the block content, without a block template.

  • Yes, this was what I was looking for :) Thank you very much. – hank Feb 15 '18 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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