Bootstrap Theme $variables I've made a sub-theme of the Bootstrap theme; however, I am having trouble understanding where $variables comes from in the page.vars.php file. I made a little "debug" code to print out the variables - unfortunately, the output is exceptionally large and has some strange outputs. I have edited page.vars.php using the variables already retrieved from the $variables associative array, e.g. I edited the size of the main content section on the page:

 $variables['content_column_class'] = ' class="col-md-8 col-sm-6"';


This suggests there should be a 'content-column-class' in the $variables array; however, amazingly when I perform print_r($variables) it turns out there is none! Furthermore, every variable I have checked that is being accessed in page.vars.php seemingly does not exist.

I'd like to edit the class of the primary / sidebar_first sections; however, currently I cannot do this as I don't know how to access them from the $variables array.

In sum, why does print_r not output the expected? And, how do I find out what variables are actually in $variables?
The proper way to add a new variables in a class is to use hook_preprocess_page(&amp;$vars) you can add the classes like the following:

$classes = array(
    'classes_main_page' =&gt; '',
    'classes_sidebar_first' =&gt; '',
    'classes_sidebar_second' =&gt; '',
  );

  // Classes when no sidebar
  if(empty($vars['page']['sidebar_first']) &amp;&amp; empty($vars['page']['sidebar_second'])) {
    $classes['classes_main_page'] = 'small-12 medium-12 large-12';
  }
// Classes when left and right sidebars
  if(!empty($vars['page']['sidebar_first']) &amp;&amp; !empty($vars['page']['sidebar_second'])) {
    $classes['classes_main_page'] = 'small-12 medium-6 large-6 columns';
    $classes['classes_sidebar_first'] = 'small-12 medium-3 large-3 columns';
    $classes['classes_sidebar_second'] = 'small-12 medium-3 large-3 columns';
  }

  // Classes when only left sidebar
  if(!empty($vars['page']['sidebar_first']) &amp;&amp; empty($vars['page']['sidebar_second'])) {
    $classes['classes_main_page'] = 'small-12 medium-9 large-9 columns';
    $classes['classes_sidebar_first'] = 'small-12 medium-3 large-3 columns';
  }

  // Classes when only right sidebar
  if(empty($vars['page']['sidebar_first']) &amp;&amp; !empty($vars['page']['sidebar_second'])) {
    $classes['classes_main_page'] = 'small-12 medium-9 large-9 columns';
    $classes['classes_sidebar_second'] = 'small-12 medium-3 large-3 columns';
  }
$vars = array_merge($vars, $classes);


and then in your page.tpl.php print something like this:

Don't forget to clear cache afterwards

&lt;aside class="&lt;?php print $classes_sidebar_second; ?&gt;"&gt; for sidebars
&lt;aside class="&lt;?php print $classes_sidebar_second; ?&gt;"&gt; for main container


Thanks