You are here

Add ing regions to Opigno

Places to add your files. Four things to do.. not including css

 

Create a region template. 

My template name: platon--site-content--right-sidebar.tpl.php

Pu it in the theme's templates folder.

My code for a plain side bar

 

<?php
  $settings = variable_get('theme_platon_settings');
  if(!empty($settings['palette'])) {
    $backgroundColor = $settings['palette']['dark_blue'];
  }
?>

<div id="right-sidebar">
  <?php print render($page['sidebar_right']); ?>
 
</div>

 

 

Then add this code to your template.php

 

function platon_theme() {
  return array(
    'platon__header' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--header',
    ),

    'platon__site_content' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--site-content',
    ),
    
     'platon__site_content__faqs_menu' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--site-content--faqs-menu',
    ),
    'platon__site_content__first_sidebar' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--site-content--first-sidebar',
    ),
    'platon__site_content__second_sidebar' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--site-content--second-sidebar',
    ),
    'platon__site_content__right_sidebar' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--site-content--right-sidebar',
    ),

    'platon__footer' => array(
      'variables' => array('page' => NULL),
      'template' => 'templates/platon--footer',
    ),
    'platon__main_navigation__item' => array(
      'variables' => array('item' => NULL),
      'template' => 'templates/platon--main-navigation--item',
    ),
    'platon__main_navigation__row' => array(
      'variables' => array('items' => array()),
      'template' => 'templates/platon--main-navigation--row',
    ),
    'platon__message' => array(
      'variables' => array('type' => 'status', 'heading' => NULL, 'messages' => array()),
      'template' => 'templates/platon--message',
    ),
    'platon__app_list' => array(
      'variables' => array('items' => NULL),
      'template' => 'templates/platon--app-list',
    ),
  );
}

 

 

And this to the .info file:

stylesheets[all][] = css/melscustom.css

regions[faqs_menu] = FAQS Menu
regions[help] = Help
regions[header_login] = Login header
regions[sidebar_first] = First sidebar
regions[sidebar_right] = Right sidebar
regions[content] = Content
regions[content_bottom] = Bottom of content
regions[footer] = Footer

 

And add this to the site content template:

<div id="site-content">
  <div class="row">
  <?php print $platon__site_content__faqs_menu; ?>
    <?php print $platon__site_content__first_sidebar; ?>
    <?php print $platon__site_content__second_sidebar; ?>
    <?php print $platon__site_content__right_sidebar; ?>
  </div>
</div>