Print data-layout-content-preview-placeholder-label value as CSS class in Template

Created on 11 May 2019, over 5 years ago
Updated 28 January 2024, 9 months ago

Hi,

I want to theme a custom block, only when placed via layout builder (want to give the one special block a height when placed via layout builder).

Current HTML Output:
<div data-layout-content-preview-placeholder-label="&quot;Headerblock Startseite&quot; block" class="block block-block-content block-block-content3fc4fa4c-90a5-4ed9-b207-34c1bcec475a"> [block content] </div>

What I would suggest to call a block via css class explicatively:
<div data-layout-content-preview-placeholder-label="&quot;Headerblock Startseite&quot; block" class="block headerblock-startseite block-block-content block-block-content3fc4fa4c-90a5-4ed9-b207-34c1bcec475a"> [block content] </div>

✨ Feature request
Status

Closed: won't fix

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡©πŸ‡ͺGermany dercheffe Sersheim, Germany

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    There has been no updates or further requests for this from other people for 5 years, so I'm marking this is closed.

    This could be implemented on a site potentially by preprocessing the block template and checking if the node type from context has Layout builder enabled. Then you could add an extra class.

    Feel free to reopen if others think this should not be closed :)

Production build 0.71.5 2024