Crea Nuove "Region" per Blocchi

Aggiungi questo codice all'interno del file template.php del tuo tema:

/** Define the regions **/
function framework_regions() {
  return array(
      'left' => t('left sidebar'),
      'right' => t('right sidebar'),
      'content' => t('content'),
      'header' => t('header'),
      'footer' => t('footer'),
      'newregion' => t('new region'),
  );
}

Sostituisci "newregion" col nome della Region che vuoi inserire.
Sostituisci "framework"della secondo riga con il nome del tuo tema (es. garland_regions)

Nel file page.tpl.php  del tuo tema, aggiungi il seguente codice dove vuoi che la nuova Region compaia

<?php if ($newregion): ?>
  <div id="new-region" class="region">
    <?php print $newregion ?>
  </div>
<?php endif; ?>

Sostituisci sempre "newregion" col nome della Region che vuoi inserire.

Tags:

Login utente