Hide the page title depending on a checkbox field in a particular content type
In Drupal 8, many small things have changed, but my willingness to quickly hack something out in a few lines of code/config instead of installing a relatively large module to do the same thing hasn't :-)
I needed to add a checkbox to control whether the page title should be visible in the rendered page for a certain content type on a Drupal 8 site, and there are a few different ways you can do this (please suggest alternatives—especially if they're more elegant!), but I chose to do the following:
Add a 'Display Title' boolean field (checkbox, using the field label as the title, and setting off to
0
and on to1
in the field settings) to the content type (page
in this example).