1

The <title> element in the <head> of every page currently has the form page_name | site_name. I would like to make this have the page name only site wide. I've found advice about how to do this in earlier drupal versions (eg here), but not for drupal 8. How is this possible?

Thanks

1 Answer 1

4

Until metatag's module port has not finished you should code a bit for doing that.

If I were you I'll edit YOURTHEME.theme file and add this:

/**
 * Implements hook_preprocess_HOOK() for HTML document templates.
 *
 * Adds body classes if certain regions have content.
 */
function YOURTHEME_preprocess_html(&$variables) {
    unset ($variables['head_title']['name']);
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.