title: Using preprocess hook on specific node type in Drupal 8
body: <p>I've had success using preprocess page hooks such as:</p>
  
  <pre><code>function mytheme_preprocess_page__node_front(&amp;$variables) {
      ...
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>function mytheme_preprocess_page__node_12(&amp;$variables) {
      ...
  }
  </code></pre>
  
  <p>which correlate with custom templates named page--front.html.twig and page--12.html.twig, respectively.</p>
  
  <p>I'm trying to implement the same hook and template pairing for a content type called Video. I understand that there is a difference in that my examples have been custom templates for specific pages while my goal is a custom template for an entire content type, but I got a custom template called node--video.html.twig that works as a template for all video pages. However when I try to write a hook based on this template name:</p>
  
  <pre><code>function mytheme_preprocess_node__video(&amp;$variables) {
      ...
  }
  </code></pre>
  
  <p>this does not work. I think that I either can't define a hook like this, or I'm just naming it incorrectly. I found a couple threads somewhat relating to this such as <a href="https://www.drupal.org/node/1692202" rel="noreferrer">this</a> that seem to imply that I need to define a hook for all nodes and then write an if statement that handles each type separately.
  So.......</p>
  
  <p><strong><em>Final Question</em></strong>: Can I define a hook for an entire content type, and if so what am I doing wrong?</p>