I'm trying to set a $page variable but it's not working. i'm studying, trying hard to understand what is show in the kpr($page) output. So as an exercise, I'm trying to change #show_messages element. by default, i get this

....(Array, 10 elements)
◦ #show_messages (Boolean) TRUE


so in the theme_hook_alter() function i did this (before the kpr() output).

$page['show_messages'] = FALSE;


but when i refresh it's not changing the output. why is that.

also, i don't really understand the difference between elements with a # before them and the ones without.
&lt;?php

/**
 * Implements hook_preprocess_HOOK()
 *
 */
function YOURTHEME_preprocess_page(&amp;$vars) {

    // All you need to do is to set the appropriate preprocess variable:
    $vars['show_messages'] = false;


    /**
    We also have $vars['page'] which is an array.

    $page = $vars['page'];
    This array is a Drupal Render Array which means would pass through drupal_render() function.
    In a Render Array keys starting with # are attributes and the others are children elements.
    Read more about that on @see https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_render/7

    */
}