how to create a panel / block / section of page

Events happening in the community are now at Drupal community events on www.drupal.org.
hezten's picture

Hi

Im webmaster for debug.dk, im trying to create a new block / panel in the frontpage design. What i am aming for is having the feautered article above left bar and middle bar.

i have added this to /var/www/data-debug.dk/openpublish/sites/all/themes/openpublish_theme/page/page-front.tpl.php

<div id="top bar" style="float: left; width: 600px; border: 1px solid black;">
top bar<? print $topbar; ?>
</div>
<br><br>

and then i changed the info file and added to this file /var/www/data-debug.dk/openpublish/sites/all/themes/openpublish_theme/openpublish_theme.info

regions[topbar] = bar over left sidebar and content bar

the div box display in the design, but i cant add content to it using context explorer

what am i missing here ?

here is version from the info file

name = OpenPublish
description = OpenPublish Default Theme.
version = VERSION
core = 6.x
engine = phptemplate

Comments

As you know Drupal theme is

resveld's picture

As you know Drupal theme is heavily cached.
Did you clear your cache and tried again? Usually that solves the problem.

Also, it's best practise to create a subtheme instead of modifying the openpublish_theme in case of upgrades etc.

-Ronald

got it working, now i just

hezten's picture

got it working, now i just need to make the other panels show beneath the top one..

How did you get it working?

ithacaindy's picture

How did you get it working?

i went into the context

hezten's picture

i went into the context module and added a block to the new region, that made the diffierence.

Sorry for the confusion, but

ithacaindy's picture

Sorry for the confusion, but I meant how did you get the featured panel/block to span the left and middle columns?

I changed the template for

hezten's picture

I changed the template for the frontpage, and added a new div... my template now looks like this

<?php
// $Id: page-front.tpl.php,v 1.1.2.7 2010/06/21 00:49:06 inadarei Exp $
/**
* @file page-front.tpl.php
*
* For the list of available variables, please see: page.tpl.php
*
* Homepage template.
* @ingroup page
*/
?>

<?php print $page_header; ?>

<?php if ($show_messages && $messages): ?>
  <div class="messages">
    <?php print $messages; ?>
  </div>
<?php endif; ?>

<?php $showhelp = variable_get('openpublish_show_help', TRUE); ?>
<?php if ($showhelp && user_access('administer nodes')): ?>
  <div class="messages status">
    <ul>
      <li><?php print t('Not sure what to do next? See:'); ?> <?php print l(t('Getting Started'), "http://openpublishapp.com/doc/openpublish-user-documentation", array('attributes' => array('target' => '_blank'))); ?> (<?php print l(t('hide this'), "admin/settings/openpublish/clear-help"); ?>)</li>
    </ul>
  </div>
<?php endif; ?>

<div id="left_content_wrapper" style="float: left; width: 620px;">

        <div id="top bar" style="width:620px;">
        <? print $topbar; ?>
        </div>

        <div id="sidebar-left" style="width: 290px; float: left;">
              <?php print $left; ?>
        </div>
        <div id="op-content" style="width: 280px; float: right;">
                <?php print $over_content; ?>
        </div>
</div>
<div id="sidebar-right" class="sidebar" style="float: right;"><!--<h1>RIGHT</h1>--><!-- #sidebar-right -->
  <?php print $right; ?>
</div>

<?php print $page_footer; ?>

As you can see a made a wrapper for the 3 divs..

Then added this line to teme info file.

regions[topbar] = bar over left sidebar and content bar

Then i went to contexts and added the "featured article" to the new region i just added.

Hopes this help.

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: