- Issue created by @laura.gates
- Status changed to Closed: duplicate
8 months ago 12:17pm 1 May 2024 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
You can do this with hook_theme_suggestions_alter
Using the default section and columns in layout builder, I would like to be able to be able to have additional theme hooks for twig by content type. This would allow me to wrap a class (such as a div) around a column (or group of columns within a section) without having to create a global class or write something custom.
FILE NAME SUGGESTIONS:
x layout--twocol-section.html.twig
x layout--twocol-section.html.twig
* layout.html.twig
Allow layout builder theme hooks to render at a content type level of granularity. EG
FILE NAME SUGGESTIONS:
x layout--page--twocol-section.html.twig
x layout-node-[number]-page--twocol-section.html.twig
x layout--twocol-section.html.twig
x layout--twocol-section.html.twig
* layout.html.twig
BEGIN OUTPUT from 'themes/custom/my-theme/templates/layout/layout--page--twocol-section.html.twig'
I don't think it's necessary to go down to a node ID for columns, but since layout builder allows "Allow each content item to have its layout customized." it should be accounted for in the road map, if accepted.
Closed: duplicate
11.0 π₯
Last updated
You can do this with hook_theme_suggestions_alter