- Issue created by @mibfire
- Assigned to bachir.benbahloul
Although in theory page-title.html.twig(https://api.drupal.org/api/drupal/core%21modules%21system%21templates%21...) supports title_attributes, title_prefix and title_suffix, this is not the case in the render array i.e for example i can't add class to the H1 html tag and i think this should be possible.
Try to add class to the page_title render element with a render array:
$build = [
'#type' => 'page_title',
'#title' => "Some page title",
'#title_attributes' => [
'class' => [
'header-title',
],
]
];
I think we should use
'render element' => 'element',
for the page_title render element like the following:
'page_title' => [
'render element' => 'element',
],
Active
11.0 🔥
Last updated