diff --git a/web/themes/custom/votegov/templates/component/page-title.html.twig b/web/themes/custom/votegov/templates/component/page-title.html.twig deleted file mode 100644 index 25dd03e7f..000000000 --- a/web/themes/custom/votegov/templates/component/page-title.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% set title = drupal_title() %} -{% set node_type = currentnode.bundle() %} - -{% if node_type == "state_territory" %} - {% set title = title | render | striptags | trim %} - {% if language == 'ko' and currentnode.field_is_state.value %} - {% set korean_state_char = "state" | t %} - {% set title = title ~ " " ~ korean_state_char %} - {% endif %} - - {% set in_state_name = currentnode.field_in_state_name.value | default("@state_name") | t({ "@state_name": title }) %} - {% set title = 'Register to vote in @state_name' | t ({ - "@state_name": title, - "@in_state_name": in_state_name - }) %} -{% endif %} - - -{{ title_prefix }} -{% if title %} - {{ title }} -{% endif %} -{{ title_suffix }} diff --git a/web/themes/custom/votegov/templates/layout/page.html.twig b/web/themes/custom/votegov/templates/layout/page.html.twig index b4e8a63e0..230ad7f43 100644 --- a/web/themes/custom/votegov/templates/layout/page.html.twig +++ b/web/themes/custom/votegov/templates/layout/page.html.twig @@ -60,6 +60,7 @@ {% set node_type = currentnode.bundle() %} {% if node_type == "state_territory" %} + {% set state_display_title = drupal_field('field_display_title', 'block_content', 23) %} {% set title = title | render | striptags | trim %} {% if language == 'ko' and currentnode.field_is_state.value %} {% set korean_state_char = "state" | t %} @@ -67,10 +68,10 @@ {% endif %} {% set in_state_name = currentnode.field_in_state_name.value | default("@state_name") | t({ "@state_name": title }) %} - {% set title = 'Register to vote in @state_name' | t ({ + {% set title = state_display_title | field_value | render | trim | t ({ "@state_name": title, "@in_state_name": in_state_name - }) %} + }) | default(title) %} {% endif %} {# Government banner component #}