Adding to Block.tpl
STB100 - September 7, 2009 - 16:46
| Project: | Block Class |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi, I'm struggling to get any css applied to my blocks.
Could somebody please sense check the syntax for me - an I missing something?
Thanks.
Stuart
<?php
// $Id: block.tpl.php,v 1.2 2009/04/03 22:18:06 jrglasgow Exp $
?>
<div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?> <?php print block_class($block); ?>">
<?php if ($block->subject) { ?><h2 class="title"><?php print $block->subject; ?></h2><?php } ?>
<?php if ($block->content) { ?><div class="content"><?php print $block->content; ?></div><?php } ?>
</div>
#1
You have mistakenly added the Block Class output to the
div'sidattribute instead ofclass. The first line should read:<div class="block block-<?php print $block->module; ?> <?php print block_class($block); ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">