Not sure what I'm doing wrong... im not a coder, so I'm not surprised.

I'm using Shannon's wonderful Nitobe theme, maybe I'm not placing the code in the right part of the block.tpl file.

This is my block.tpl:

print $block_uniq; " class=" print $block_class; "> if (function_exists(block_class)) print block_class($block);
if (!empty($block->subject)):
if (($block->region == 'header') || ($block->region == 'masthead')):

print $block->subject

else:

print $block->subject

endif;
endif;
print $block->content

This is the code i'm placing in the style sheet for now:

.simpleblock {
border: 1px solid #333;
}

Then in the configure block, ive tried both "simpleblock" & ".simpleblock" in the CSS class.

Any ideas? Thanks....

Comments

ctalley5’s picture

Sorry for the poor code post.... lets try that again...

 <div id="<?php print $block_uniq; ?>" class="<?php print $block_class; ?>"> <?php if (function_exists(block_class)) print block_class($block); ?>
  <?php if (!empty($block->subject)): ?>
    <?php if (($block->region == 'header') || ($block->region == 'masthead')): ?>
      <h2><?php print $block->subject ?></h2>
    <?php else: ?>
      <h3><?php print $block->subject ?></h3>
    <?php endif; ?>
  <?php endif;?>
  <?php print $block->content ?>
</div> 
todd nienkerk’s picture

Here's why it's not working:

class="<?php print $block_class; ?>"> <?php if (function_exists(block_class)) print block_class($block); ?>

...Should be:

class="<?php print $block_class; ?> <?php if (function_exists(block_class)) print block_class($block); ?>">

You need to insert the Block Class module snippet inside the closing quote for class="".

ctalley5’s picture

That worked... thanks for the quick help!

I notice the block theme gets wiped when inserted in Panels.... Does that require more customization, or is that something this module would not be capable of adapting with?

ctalley5’s picture

I spoke too soon.... you cannot just rely on the block settings, at the bottom of the panel page, you have to add the CSS class (for anybody who has the same question).

Thanks for your help Todd.

ctalley5’s picture

Status: Active » Closed (fixed)
todd nienkerk’s picture

ctalley: Can you document which version of Panels you are running for those who may read this issue later on?

ctalley5’s picture

Absolutely, sorry about that... i'm running Panels 6.x-3.0-alpha2 . I'm not sure if it's the same on 2.0 or not.