Closed (fixed)
Project:
Block Theme
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2012 at 18:45 UTC
Updated:
22 Mar 2012 at 21:30 UTC
i am using tapestry theme with block theme, in tapestry theme there are several custom blocks available, i tried to use it but none is working i am using D7.1 and i also tried to create own block named "block--blocktheme--redblock.tpl.php".
i have also defined class in style.css.
I SELECTED RED BLOCK IN BLOCK THEME AND ALSO CLEARED CACHE, BUT STILL ITS NOT WORKING, WHAT COULD BE THE ISSUE?
I AM NOT ABLE TO ATTACH THE FILE PLEASE FIND BELOW THE CODE FOR BOTH FILES.
<?php
/**
* @file
* tapestry block--blockthme--xx.tpl.php
* to use this file you need Block Theme Module http://drupal.org/project/blocktheme
* for Default theme implementation to display a block see modules/block/block.tpl.php.
*/
?>
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="<?php print $classes; ?> redblock"<?php print $attributes; ?>>
<?php print render($title_prefix); ?>
<?php if ($block->subject): ?>
<h2 <?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php endif;?>
<?php print render($title_suffix); ?>
<div <?php print $content_attributes; ?>><?php print $content ?></div>
</div>
/* tapestry style.css 11 2011-10-02 08:24:51MEZ AlyxVance */
#mainContent {
height:auto;min-height:300px;
}
/* www.roopletheme.com */
/* init */
html,
body,
div,
dl,
dt,
dd,
h2,
h3,
h4,
h5,
h6,
pre,
form,
p,
blockquote,
input {
margin: 0;
padding: 0;
}
.admin-list dd {
padding-bottom:5px;
}
/* layout */
body {
margin: 0;
padding: 0;
text-align: center; /* centers container in IE 5 */
}
/* added for js button add shortcuts */
#branding .add-or-remove-shortcuts{
/* padding:0;*/
margin:3px 0 0 0;
float:left;
}
#branding h1.title {
/* color: #000;
margin: 0;
padding-bottom: 10px;
font-size: 1.385em;
font-weight: normal; */
float: left;
}
p {
margin: 0.5em 0;
}
#leaderboard {
min-height:1em;
height:auto;
}
/* IE */
/*\*/
* html #leaderboard {
height: 1em;
}
/**/
#header {
/* padding: 0 10px 0 20px; */
text-align: left; /* overrides text-align: center */
}
#headercontainer {
width: 900px;
margin: 0 auto; /* center page */
text-align: left; /* overrides text-align: center */
padding: 9px 0 0 0;
}
#header h1 {
margin: 0;
padding: 10px 0;
}
.site-logo {
float:left;
margin-right: 10px;
}
.site-slogan {
font-size: 110%;
}
.node {
margin-bottom: 10px;
padding-bottom: 5px;
}
.sticky,
.node-sticky {
padding: 10px 0 10px 0;
}
#container h1,
#container h1.title {
line-height: 125%;
font-size: 180%;
margin: .25em 0 .25em 0;
}
.site-name {
line-height: 0.8em;
white-space:nowrap;
}
.breadcrumb {
padding: 0 0 0 10px;
float: left;
}
div ul.menu {
padding:0 0 0.25em 0.5em;
margin:0.5em 0 0 0;
}
.item-list ul li,
.block-poll ul.links li {
margin:0 0 0 1em;
padding:0 0 0 0;
-webkit-margin-start: 1.25em;
}
.block-poll ul.links {
margin:10px 0 0 0;
padding:0;
}
.block-poll ul.links li {
border:none;
}
.block-poll ul.links a {
font-weight:normal;
}
#primary {
float: right;
padding-right: 20px;
}
#primary ul {
margin-top: 0;
margin-bottom: 0;
}
#primary ul li {
display: inline;
/* margin: 0 0 0 20px;*/
}
#primary li a {
/* padding: 3px 3px 3px 18px; */
font-weight:bold;
font-size: 90%;
}
.comment {
padding: 10px;
margin: 10px 0;
}
.front .comment-add,
.front .comment-forbidden,
.front .comment_forbidden,
.page-blog .comment-add,
.page-blog .comment-forbidden,
.page-blog .comment_forbidden {
display:none;
}
#forum table {
width: 100%;
}
#forum td .name {
margin:3px 0 0 0;
}
.region-suckerfish {
display:-moz-inline-box;
display:-webkit-inline-box;
}
#search {
float: right;
margin-right:10px;
}
#search .unstyled-block {
float: right;
margin:0 0 0 0 !important;
padding:0 0 0 0 !important;
}
#search #search-block-form,
#search-block-form div,
#search-block-form label,
#search h2.title,
#search .content,
#search div {
display:inline;
}
#search h2.title {
font-size:1em;
}
#header-bottom {
height: 3px;
font-size: 0px;
}
#outer-container {}
#page-right {
width:924px;
margin: 0 auto; /* center page */
}
#page-left {}
#banner {
width: 900px;
margin: 0 auto; /* center page */
}
#container {
width: 900px;
margin: 0 auto; /* center page */
text-align: left; /* overrides text-align: center */
padding-top: 5px;
}
#header-region-container,
#footer-region-container {
width: 900px;
margin: 0 auto; /* center page */
}
#region5 h2,
#region5 h2.title {
margin: 0 0 5px 0;
}
#header-left,
#header-center,
#header-right,
#footer-left,
#footer-center,
#footer-right,
#user1,
#user2,
#user3,
#user4,
#user5,
#user6,
#user7,
#user8,
#user9,
#user10,
#user11,
#user12,
#user13,
#user14,
#user15 {
float: left;
}
#sidebar-left {
float: left;
width: 180px;
display: inline;
}
#sidebar-right {
float: right;
width: 180px;
display: inline;
}
#sidebar-outside {
float: left;
width: 180px;
clear: left;
}
#inside-content {
float: right;
}
#mission {
padding: 3px 0;
margin: 10px 0;
}
#content-top-left,
#content-bottom-left {
float: left;
}
#content-top-right,
#content-bottom-right {
float: right;
}
#mainContent {
float: left;
width:650px;
}
#container .page-bottom {
height: 10px;
font-size: 0px;
}
#mastfoot-bottom {
height: 3px;
font-size: 0px;
}
#trailerboard {}
#footer-message {
text-align: center;
}
#footer-message p {
margin: 0;
padding: 10px 0;
}
img.rtlogo {
display: block;
margin: 0 auto;
padding-top: 5px;
}
#round-right {
width:924px;
margin: 0 auto; /* center page */
}
#round-left{}
#round-container {
width: 862px;
height:50px;
margin: 0 auto; /* center page */
}
tbody {
border-top: none;
}
/* typography */
fieldset,img {
border: none;
}
body {
font: 100%/1.25em Arial, Verdana, Helvetica, sans-serif;
font-size: 90%;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
#mission {
text-align: center;
}
#leaderboard,
#banner,
#header-region,
#footer-region,
#sidebar-outside,
#sidebar-left,
#sidebar-right,
#content-top,
#content-bottom,
#region1,
#region2,
#region3,
#region4,
#region5,
#footer {
font-size: 95%;
}
.node h1,
.node h2,
.node h2.title,
.node h3 {
line-height: 125%;
}
#banner h2,
#banner h2.title,
#leaderboard h2,
#leaderboard h2.title,
#header-region h2,
#header-region h2.title,
#footer-region h2,
#footer-region h2.title,
#sidebar-outside h2,
#sidebar-outside h2.title,
#sidebar-left h2,
#sidebar-left h2.title,
#sidebar-right h2,
#sidebar-right h2.title,
#content-top h2,
#content-top h2.title,
#content-bottom h2,
#content-bottom h2.title,
#region1 h2,
#region1 h2.title,
#region2 h2,
#region2 h2.title,
#region3 h2,
#region3 h2.title,
#region4 h2,
#region4 h2.title,
#region5 h2,
#region5 h2.title,
#footer h2,
#footer h2.title {
font-size: 110%;
}
#sidebar-outside h3,
#sidebar-outside h3.title,
#sidebar-left h3,
#sidebar-left h3.title,
#sidebar-right h3,
#sidebar-right h3.title {
font-size: 100%;
}
.node h2,
.node h2.title {
margin-bottom: 4px;
}
#footer-message {
font-size: 80%;
}
/* box styles */
.boxborder {
padding:0 7px 0 0;
}
.bi {
padding:0 0 0 7px;
}
.bt {
height:7px;
margin:0 -7px;
line-height: 0px;
font-size: 0;
}
.bt div {
width:7px;
height:7px;
line-height: 0px;
font-size: 0;
}
.bb {
height:7px;
margin:0 -7px;
line-height: 0px;
font-size: 0;
}
.bb div {
width:7px;
height:7px;
line-height: 0px;
font-size: 0;
}
/* pager */
.pager {
clear:both;
text-align:left;
}
.pager a,
.pager strong.pager-current {
padding: 0.4em 0.4em 0.2em;
}
.pager {
font-size: 0.8em;
clear:both;
padding: 10px 0px 10px !important;
}
.pager div {
padding:0em;
display:inline;
}
.pager strong,
.pager a,
.pager a:link,
.pager a:visited {
margin:0px 0.15em 0px 0.15em;
font-weight: bold;
}
.pager a:hover {
text-decoration:none;
font-weight: bold;
}
.pager strong {
font-weight: bold;
}
.item-list .pager li {
padding:0;
margin:0;
}
/* drupal elements */
.book-navigation .menu {
padding: 1em 0 1em 3em;
}
/* util */
.clearfloat {
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
.width99 {
width: 100%;
}
.width49 {
width: 50%;
}
.width33 {
width: 33%;
}
.width34 {
width: 34%;
}
/* block theme styles */
.unstyled-block {
padding: 10px;
}
.region-content .unstyled-block {
padding: 0px;
}
#mission .unstyled-block {
padding: 0 .3em 0 .3em;
}
.rollover1-block {
margin: 5px;
}
.rollover-block h2 {
padding: 2px 5px;
}
.rollover-block ul,
.rollover-block ul.menu {
list-style: none;
padding: 0;
margin: 0;
}
.rollover-block ul li,
.rollover-block ul li.leaf,
.rollover-block ul li.collapsed,
.rollover-block.block-poll ul.links li {
padding: 0 0 0 0;
list-style-image: none;
list-style-type: none;
padding: 0;
margin: 0;
}
.rollover-block ul li a {
margin: 0;
padding: 0 10px;
display: block;
text-decoration: none;
}
.custom-inbox {
padding: 10px;
}
.no-margins-block {
padding: 0;
margin: 0;
}
.redblock-block {
background-color: #b8b800;
border-bottom-width:;
border-bottom: double;}
.no-margins-block p {
margin: 0;
}
.stripebox h2 {
margin: 0 -10px 5px -10px;
padding: 0 5px;
}
.blk-outline,
.blk-solid {
margin: 5px;
padding: 5px;
}
#leaderboard .blk-outline,
#leaderboard .blk-solid,
#banner .blk-outline,
#banner .blk-solid {
margin: 0;
padding: 5px;
}
/* custom typography styles */
span.alert,
span.help,
span.info,
span.note,
span.info,
span.errormsg,
span.xfer {
display: block;
padding: 10px 10px 10px 10px;
margin: 0 10px;
}
span.alert {
background-color: #F3CECE;
border-top: 2px solid #d04040;
border-bottom: 2px solid #d04040;
}
span.errormsg {
background-color: #F3CECE;
border-top: 2px solid #d04040;
border-bottom: 2px solid #d04040;
}
span.help {
background-color: #CADAEF;
border-top: 2px solid #3060a0;
border-bottom: 2px solid #3060a0;
}
span.note {
background-color: #F8EFD0;
border-top: 2px solid #E6CC62;
border-bottom: 2px solid #E6CC62;
}
span.info {
background-color: #F8EFD0;
border-top: 2px solid #E6CC62;
border-bottom: 2px solid #E6CC62;
}
span.xfer {
background-color: #DDF8EB;
border-top: 2px solid #20a060;
border-bottom: 2px solid #20a060;
}
pre {
padding:10px;
background:#F8F8F8 none repeat scroll 0%;
border:1px solid #C0C0C0;
margin: 10px 0;
}
blockquote {
padding: 10px 10px 10px 30px;
font-style:italic;
/*font-size:110%;*/
line-height:130%;
color: #555;
margin: 15px;
background: transparent url(images/blockquote.gif) no-repeat scroll 0 5px;
}
.messages {
padding: 5px;
margin: 10px 0;
}
#suckerfishmenu div .contextual-links-wrapper {
display:none;
}
.submitted {
font-size: 0.8em;
}
.node .taxonomy,
.node .field-type-taxonomy-term-reference {
font-size: 0.8em;
line-height: 100%;
/* padding-left: 1.5em; */
}
#primary .expanded ul {
display:none;
}
.block-region {
color:black;
}
.sticky-table.tableheader-processed.sticky-enabled {
width:100%
}
#block-node-recent table {
width:100%;
}
Comments
Comment #1
amateescu commentedThe problem is that in your template you are using the redblock class and in the css file you're styling the redblock-block class.
Comment #2
APCC commentedI am having the same issue using the Bluemarine theme.
This is the code from my blocktheme-redblock.tpl.php file:
This is the CSS code I put in my style.css sheet:
.redblock {background:red;
color:fff;
}
I was able to select the Red Block option under custom theme on my block page, but nothing changes. Any help would be so appreciated.
Comment #3
APCC commentedOk, how to I post that code without it changing???
Comment #4
amateescu commentedYou post it in
<code>tags :)Comment #5
APCC commentedWell that's one problem down. Thank you!
Comment #6
amateescu commentedYou are missing a space before 'redblock', and that makes your class, for example: block-MODULEredblock, instead of: block-MODULE redblock.
Comment #7
APCC commentedSo instead of
<div class="block block-<?php print $block->module; ?>redblock" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">It should be
<div class="block block-<?php print $block->module; ?> redblock" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">?
Comment #8
APCC commentedOh my god that worked!!! One little space and BAM! I love you!
Comment #9
amateescu commentedYep, that was it. You're welcome :)