Theme (display)
Theming is the process of customizing the display of pages or fields. Drupal 8 theming is a two part process, as described below. Tripal uses the Drupal theming system without alteration.
Use
hook_theme
to tell Drupal about your custom template. This hook implementation should go in yourmy_module.module
file.Use the preprocess hook to use prepare your variables and do any processing needed.
Finally, you use Twig templates to format the HTML and insert the variables prepared in the preprocess hook. No processing should be done in these templates.