Created on 2 October 2024, about 2 months ago

this is more of an FYI for others as i struggled trying to deduct the method to get it to work correctly.

Wanted to use tabs for my faq section, i used EBT Tabs (extra block types) and just used a dummy page to pull the block in to it.
You must us the {{ drupal_block('block_content:uuid') }} method our the java script config get pushed out in plain text at the bottom of the block, weird.

So for some simple steps

  • Create a page with just a title and body (this is used for the url and routing)
  • Create a template override for that exact page (on node 407 it should be node--406.html.twig since we don't need to over-write the entire content type just that exact page.
  • Now edit your new template and only keep " "
  • Now we i setup the include with {{ drupal_block('block_content:uuid') }}. (other methods to pull the block into the page failed)
  • to find the uuid, go to your database and and find the block_content table, there you will find a uuid column.
  • Now the block include will work with a "one off" dummy page, and not kill the javascript

The above method works to pulls a number of views into ebt_tabs for a tabbed instance of a block, this might work with other use cases.

📌 Task
Status

Active

Version

3.4

Component

Documentation

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024