Drupal 9
{% if content.field_inner_hero %}
<div id="innerhero">
{{ content.field_inner_hero }}
</div>
{% endif %}
Better
{% if content.field_inner_hero[0] %}
<div id="innerhero">
{{ content.field_inner_hero }}
</div>
{% endif %}
{{ title_prefix }}
{% if title %}
<h1{{ title_attributes.addClass('title').setAttribute('id', 'page-title') }}>{{ title }}</h1>
{% endif %}
{{ title_suffix }}
Another way
<div id="nodebody{{ node.id }}" {{ content_attributes.addClass('nodearticle') }}>
I realise the following is not very helpful as I've pasted my code solution and didn't have the time to explain it.... Now I'm looking at it wondering what I was trying to solve. Anyway, if I remember I'll come back and fill in the blanks...
https://www.mediacurrent.com/blog/simplify-menu-and-twig-…
I had some issues installing PHP 7.3 on Centos 7 With Yum. I found the solution here: https://unix.stackexchange.com/questions/435242/problems-installing-php-7-on-centos-7-with-yum.
This is such a vital part of the build process for D8/9 that it's a shame it's not something you just tick in the CMS. Then again, I believe the idea is to have the additional settings/files on your local machine and not on your production server. That way the production server is always fully…
In Drupal 8/9 you create a MYTHEME.info.yml file to specify the theme name, and base themes (if this is a child theme), regions, etc. One of the items is a reference to your 'libraries'.
name: MYTHEME
type: theme
description: Custom Drupal 9 theme
base theme: stable
core_version_requirement: ^8…