Closed (fixed)
Project:
Block Theme
Version:
6.x-1.0-beta1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2008 at 10:21 UTC
Updated:
31 Oct 2010 at 16:58 UTC
Hi,
I've duplicated my block.tpl..php to the following, but where do I add 'superblock' please?
superblock|My SuperTemplate in the block theme config.
<?php // $Id: block.tpl.php,v 1.3 2008/09/09 13:14:22 jmburnz Exp $
/**
* @file
* block.tpl.php
*
* Theme implementation to display a block.
*
* @see template_preprocess()
* @see template_preprocess_block()
*/
?>
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?>">
<div class="block-inner">
<?php if (!empty($block->subject)): ?>
<h2 class="block-title"><?php print $block->subject; ?></h2>
<?php endif; ?>
<div class="block-content">
<div class="block-content-inner">
<?php print $block->content; ?>
</div>
</div>
</div>
</div> <!-- /block -->My .css is as follows:
.block h2.block-title {
color: #FFF;
font-size: 12px;
font-weight: bold;
height: 22px;
margin: 0px;
padding: 5px 0 0 0;
text-align: center;
}
.superblock h2.block-title {
color: #000000;
font-size: 12px;
font-weight: bold;
height: 22px;
margin: 0px;
padding: 5px 0 0 0;
text-align: center;
}
Would most appreciate your help, and thank you.
Lilian
Comments
Comment #1
dragonone commentedHello Lillian.
If I understand you question correctly you want to style your superblock with the superblock class you have defined.
This is quite simple - you just add the class definition to the outer div:
Before:
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?> ">After:
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?> superblock">This should do the trick - the superblock css will override the styles defined in the block css.
I hope it helps you out.
Comment #2
liliplanet commentedThank you Dragone for your reply.
I've changed to
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?> superblock">to my template called blocktheme-superblock.tpl.php
in the css have
still no change in other words the title does not change to #000000 on the selected block.
Probably missing something small, yet cannot see where .. :)
Most appreciate your help.
Lilian
Comment #3
theamoeba commentedfirst off, why are u using Block Theme, when u can just do either of the following:
1. block-module-delta.tpl.php
2. block-module.tpl.php
3. block-region.tpl.php
now lets have a look at your css, it seems to work quite nicely for me, i have reproduced it, not in a drupal environment tho, perhaps there is a css clash, change the css class name.
Comment #4
liliplanet commentedThank you for your reply. Yes, I would like to use Block Theme as categorizing blocks for user, news, friends, etc. Block Theme is easier that way.
Have now renamed in Block Theme:
redblock|My SuperTemplate
.redblock h2.block-title {
color: #000000;
font-size: 12px;
font-weight: bold;
height: 22px;
margin: 0px;
padding: 5px 0 0 0;
text-align: center;
}
renamed: blocktheme-redblock.tpl.php
and still no change .. (:
any ideas please?
Lilian
Comment #5
liliplanet commentedI've added the :
.redblock h2.block-title {
color: #000000;
font-size: 12px;
font-weight: bold;
height: 22px;
margin: 0px;
padding: 5px 0 0 0;
text-align: center;
}
to my theme style.css file. Is that where should it be, or should it be in modules/system/defaults.css?
so close ..
Thank you for any reply.
Lilian
Comment #6
amateescu commentedIs this still an issue?
Comment #7
liliplanet commentedIt's all perfect, thank you! Wonderful module :)