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

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

1 Answer 1

2

Use Twig Tweak and

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

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

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

Your Answer

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

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