6

How to remove "Welcome to" from header title on front page in Drupal 8

enter image description here

In drupal 7 you just add in page.tpl.php this part of code:

<?php if (!$is_front){
print render($page['content']);
} ?>
Edin Puzic
  • 998
  • 2
  • 19
  • 39

2 Answers2

13

In D8 frontpage is a view. To change title of the front page, go to admin/structure/views/view/frontpage, find Global: Title override link

enter image description here

Open it and it will allow to set or remove custom front page title.

pavlovich
  • 1,935
  • 15
  • 20
  • Is it possible to make this text translatable? – Benedikt Oct 10 '16 at 09:39
  • For me, when removing the _Title override_ setting the word _Home_ appears before the site name. Ex. "Home | Dr Taifi". If you want to use only the site name as the front page tile you can modify the *html.html.twig* for your theme and use `{% if not root_path %}{{ head_title.name }}{% else %}{{ head_title|safe_join(' | ') }}{% endif %}` for the title tag. – Juanmi Sosso Jul 08 '17 at 08:56
0

Default views with url /node we leave as it is.

In page.html.twig we output all blocks except content block:

{% if is_front %}
  {{ page.content.breadcrumbs }}
  {{ page.content.page_title }}
  {{ page.content.local_tasks }}
  {{ page.content.help }}
  {{ page.content.local_actions }}
  {#{{ page.content.content }}#} < no content
{% else %}
  {{ page.content }}
{% endif %}

page-title.html.twig

{% if title %}
    {# nothing #}
{% else %}  {# for other pages #}
    <h1{{ title_attributes.addClass('page-header') }}>{{ title }}</h1>
{% endif %}
Dunot
  • 190
  • 2
  • 8