govCMS / govcms8_uikit_starter

GovCMS 8 UI-Kit Starter
10 stars 16 forks source link

Double Page title #69

Open HurricaneInteractive opened 5 years ago

HurricaneInteractive commented 5 years ago

Using the current field--node--title.html.twig and page-title.html.twig template files are producing a double up on <h1> elements being rendered.

  <h1 class="au-header-heading"></h1>
  <h1 class="au-header-heading">Page title</h1>

I think this is happening because the field--node--title.html.twig is including the page-title.html.twig file instead of rendering the content which will render the page-title.html.twig template. Similar to the "stable" drupal 8 theme.

Drupal 8: Core Stable Theme - field--node--title.html.twig

{% for item in items %}
  {{ item.content }}
{% endfor %}

GovCMS8 uikit - field--node--title.html.twig

{% for item in items %}
  {% include '@govcms8_uikit_starter/content/page-title.html.twig' with {
    title: item.content,
    title_attributes: attributes
  } only %}
{% endfor %}
simesy commented 5 years ago

Seems reproducable? @Venkata-modgu can you reproduce?