The label of an ECK entity with enabled title base field is not documented in code comment block how to get printed in the eck-entity.html.twig file in a way how it is common to Drupal content entities and nodes.
In node.html.twig the label is documented in the comment block and printable like expected by using the label tag. Same goes for custom entities created by drush generate content:entity. In the latter the comment block mentions content.label and this is exactly the way to print the label in the respective twig file.
Proposed solution
Assuming that many use cases of ECK entities will use the title base field, make title base field documented in eck-entity.html.twig and add the correct tag to be used to the comment block.
Additional task
Assuming that ECK needs to deal with many possibly scenarios including entities without a label base field, it needs a twig logic to check against if label exist before printing it. This should be added to the code comment block too.
Issue fork eck-3482263
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dqdComment #3
dqdComment #4
dqdLike I have expected, I found out the correct twig tag after further investigating and trying. Since I already mentioned that to possibly happen in the issue summary in the previously existing consideration section, I immediately changed the scope if the issue accordingly and removed the last part in the issue summary about it.
Comment #6
dqdComment #7
dqdAdditionally we should consider to add
in
templates/eck-entity.html.twigbefore{{ content }}.