title: Drupal 8 preprocess page
body: <p>I'm new in Drupal 8 &amp; I have an issue.<br>
  I need to display a CCK field (custom field) in my theme page <code>page-front.html.twig</code>.</p>
  
  <p>As I understand it's impossible to display node variables in a non-node page, so I start to do a preprocess hook.</p>
  
  <p>My preprocess looks like this:</p>
  
  <p><strong>mythemename.theme</strong></p>
  
  <pre><code>&lt;?php
  
  function THEME_NAME_preprocess_page(&amp;$vars) {
    if (isset($vars['node'])) {
      $node = $vars['node'];
      if ($node-&gt;isset('field_numero_cin') {
        $field_cin = $node-&gt;get('field_numero_cin');
        $vars['field_cin'] = $field_image-&gt;value();
      }
    }
  }    
  </code></pre>
  
  <p>Unfortunately, when I'm debugging (kint) my variable in <code>page-front.html.twig</code> is <code>NULL</code>.</p>