Something I can't understand in Acquia Marina theme I have downloaded the Acquia Marina theme yesterday.  

I cannot understand well the following code; there is a lot of code like the following, in page.tpl.php.

&lt;?php print theme('grid_block', $search_box, 'search-box'); ?&gt;
&lt;?php print theme('grid_block', theme('links', $secondary_links), 'secondary-menu'); ?&gt;
&lt;?php print theme('grid_block', $primary_links_tree, 'primary-menu'); ?&gt;
&lt;?php print theme('grid_block', $tabs, 'content-tabs'); ?&gt;
&lt;?php print theme('grid_block', $footer_message, 'footer-message-text'); ?&gt;
..............


Acquia Marina theme version is 6.x-3.1. I didn't find a template.php file between its files. Where is the variable declared? Why doesn't the code use $primary_links_tree directly?
The Acquia Marina theme is a sub-theme of Fusion core. $primary_links_tree is defined in the template file of that theme, in the fusion_core_preprocess_page(), which the preprocess function that is called before page.tpl.php is used to output a page. Starting from line 80, you find the following code:

$vars['primary_links_tree'] = '';
if ($vars['primary_links']) {
  if (theme_get_setting('primary_menu_dropdown') == 1) {
    // Check for menu internationalization
    if (module_exists('i18nmenu')) {
      $vars['primary_links_tree'] = i18nmenu_translated_tree(variable_get('menu_primary_links_source', 'primary-links'));
    }
    else {
      $vars['primary_links_tree'] = menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
    }
    $vars['primary_links_tree'] = preg_replace('/&lt;ul class="menu/i', '&lt;ul class="menu sf-menu', $vars['primary_links_tree'], 1);
  }
  // ...
}