1

I have to add a Title field to each content type to ensure a title appears on the node view.

This makes me wonder: Maybe I'm missing the title variable in my implementation of page.twig.html or something, but I don't see a title variable anywhere in the default page.html.twig.

  1. In which template should my title variable be displaying?
  2. What should the code in the template look like to display the title?

1 Answer 1

4

Page title is now a block

The page title is now provided by a block so it can be easily moved without editing the page template.

The markup for the page title can be edited in page-title.html.twig, and template_preprocess_page_title() can be used in conjunction with the template

Source: https://www.drupal.org/node/2568563

1
  • 1
    Thanks - I must have accidentally moved it to 'disabled' in block layout...so that fixed it.
    – Sage
    Feb 8, 2017 at 19:07

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.