Having a few problems here! The created theme is not showing in the colour theme selection box
I created "redblocktemplate\Red Block" in Block Theme
I then created a file in my current themes folder called "blocktheme-redblocktemplate.tpl.php"
I then pasted the code from my "block.tpl.php" into the file ie...
<?php // $Id: block.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $ ?> <div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?>"> <?php if (!empty($block->subject)): ?> <h2><?php print $block->subject ?></h2> <?php endif;?> <div class="content"><?php print $block->content ?></div> </div>
I then changed "block.tpl.php" to "redblocktemplate.tpl.php"
I then pasted the text you suggested ie... again changing the name to "redblocktemplate.tpl.php"
<?php // $Id: redblocktemplate.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $ ?> <div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?>"> <?php if (!empty($block->subject)): ?> <h2><?php print $block->subject ?></h2> <?php endif;?> <div class="content"><?php print $block->content ?></div> </div> <div class="block block-<?php print $block->module; ?> redblocktemplate " id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>"> <h2> <span><?php print $block->subject; ?></span> </h2> <?php print $block->content; ?> <div class="block-bottom"> </div> </div>
So I have both of these bits of code sitting in my "blocktheme-redblocktemplate.tpl.php" file, one under the other as above.
I then as suggested, added the following to my style.css... (presume it doesnt mater where this goes in the .css file?)
.redblocktemplate {
}
.redblocktemplate h2 {
padding-top: 0.5em;
background-color: #fddfbc;
font-size: 1.2em;
font-weight: bold;
text-align: center;
}
.redblocktemplate .item-list ul li {
border: 1px dashed #c8bfbf;
padding-left: 3px;
}
.redblocktemplate .more-link {
margin: 0 6px 0 0;
}
.redblocktemplate .block-bottom {
background: #000000 none repeat;
}
Where am I going wrong?
Any chance you could upload the correct files I can replace, thanks
Many Thanks in advance
D
Comments
Comment #1
Anonymous (not verified) commentedHi Dominic,
First I noticed that in your issue posting you mentioned:
I created "redblocktemplate\Red Block" in Block Theme
This should be:
"redblocktemplate|Red Block" with | instead of \
Furthermore you mixed up the two possible ways to address this issue.
One way is to create your own template file (redblocktemplate.tpl.php in your case). I this case you have to add the css class name as a literal to your template file:
The other way is to stick with a default template (block.tpl.php or block-block.tpl.php for example) and use the $blocktheme variable:
The advantage of the second possibility is that you can use one template file for several block theme's if the only differences are in the css.
Comment #2
amateescu commentedNo author comments on this issue for over two years, I guess this is fixed.