-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: ODSG-45
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...on_design_subtheme/templates/block/block--field-block--node--public-page--title.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{# | ||
/** | ||
* @file | ||
* Theme override to display the node title as a block. | ||
* | ||
* We ignore options to display the block title and we add the page-title | ||
* class to ensure consistent display with the `page title` block on other | ||
* pages. | ||
* | ||
* Note: ideally we'd want to use the `page title` block directly in the | ||
* layout builder but it's been disabled. | ||
* | ||
* @see https://www.drupal.org/project/drupal/issues/3029819 | ||
* @see https://www.drupal.org/project/drupal/issues/2938129 | ||
* | ||
* Available variables: | ||
* - plugin_id: The ID of the block implementation. | ||
* - label: The configured label of the block if visible. | ||
* - configuration: A list of the block's configuration values. | ||
* - label: The configured label for the block. | ||
* - label_display: The display settings for the label. | ||
* - provider: The module or other provider that provided this block plugin. | ||
* - Block plugin specific settings will also be stored here. | ||
* - content: The content of this block. | ||
* - attributes: array of HTML attributes populated by modules, intended to | ||
* be added to the main container tag of this template. | ||
* - id: A valid HTML ID and guaranteed unique. | ||
* - title_attributes: Same as attributes, except applied to the main title | ||
* tag that appears in the template. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* | ||
* @see template_preprocess_block() | ||
*/ | ||
#} | ||
{% | ||
set classes = [ | ||
'block', | ||
'block-' ~ configuration.provider|clean_class, | ||
'block-' ~ plugin_id|clean_class, | ||
] | ||
%} | ||
<div{{ attributes.addClass(classes) }}> | ||
<h1 class="cd-page-title"> | ||
{% block content %} | ||
{{ content }} | ||
{% endblock %} | ||
</h1> | ||
</div> |