Blocktheme - incorrect configuration?

yt2s - April 29, 2009 - 01:58

I'm not getting the blocktheme module to work. Is there something I've missed?

As far as I know, I've followed the instructions in the Readme file to the letter. I've watched the tutorial over at mustardseed, and spent the better part of the day looking for syntactical errors and searching for solutions here on drupal.org.

Here's what I've done:
uploaded blocktheme-smallblue.tpl.php:

<?php
// $Id: smallblue.tpl.php $
?>

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?> smallblue">

<?php if (!empty($block->subject)): ?>
  <h2><?php print $block->subject ?></h2>
<?php endif;?>

  <div class="content"><?php print $block->content ?></div>
</div>

  • In admin/settings/blocktheme I've declared a block theme: smallblue|Small Blue Block
  • cleared the cache
  • ran update.php
  • played with all kinds of variations in the blocktheme-smallblue.tpl.php file
  • checked for functionality in Garland (following all previously mentioned items) just to make sure it wasn't my theme messing it up. Still nothing.
  • everything else I can think of (that list would bore you to tears):-)

Firebug shows it didn't pick up the smallblue class (or any class I tried), and dev module reveals that block.tpl.php is the template called, modules/system/block.tpl.php is the template used and it says that blocktheme-smallblue.tpl.php is a candidate; but blocktheme-smallblue.tpl.php IS there. The system just won't pick it up.

Is there perhaps a need to add some code into template.php for this to work?

I'm at a loss to understand this. Surely there's something simple I'm missing.

JacobSingh, g.idema or anyone involved in or experienced with the blocktheme module: Could you please offer me some insight?

Sounds like you are doing

dougzilla - April 29, 2009 - 03:45

Sounds like you are doing everything right. It is not a problem with your .tpl file for sure. It is in the theme folder right?
Just out of curiosity, you don't have an html editor enabled on the edit box for blocktheme do you? A stray bit of html might possibly bugger it up.

dougzilla It is in the theme

yt2s - April 29, 2009 - 13:20

dougzilla

  • It is in the theme folder.
  • It just so happens I did have an editor (trying out the YUI Rich Text Editor) enabled. I never even considered that. I was sure hoping that was it, but, after disabling all YUI modules, and clearing cache, etc....... no change. :( .


YT2S

stupid question but, did you

smurfy - April 29, 2009 - 07:53

stupid question but, did you edit your block and configured that the block should use the theme?

by default the default block tpl is used.

smurfy Not a stupid question

yt2s - April 29, 2009 - 13:20

smurfy
Not a stupid question at all. Its a valid one! :) Yes, I did. In fact I thought I was loosing my mind, thinking that's the only thing it could be. I've been back to admin/build/block/configure/... several times just to check. The Custom Theme drop down is there revealing the Small Blue Block custom block theme declared in admin/settings/blocktheme. Additionally, I've un-set, saved, cleared cache and re-set the theme in block/configure several times also thinking it just didn't take.


I even thought that perhaps some other module is interfering, so, I've disabled just about everything short of core, and tested along the way. Nothing.


I'm bewildered.

YT2S

Did you make it work? I am

dougzilla - April 29, 2009 - 21:54

Did you make it work? I am curious.

dougzilla I did make it work

yt2s - April 29, 2009 - 23:39

dougzilla
I did make it work on another server; but I did nothing different code wise(that I'm aware of) on the other server. This is a real head scratcher.

I'm beginning to wonder about the Drupal install itself on the first server. Come to think of it, on the first server, drupal was a one click install through cpanel (fantastico I think?), and on the other server I manually installed everything. The db & drupal I manually installed works with blocktheme. It may be total coincidence; but I'm still just not sure. Over the next couple of days, I may remove the auto installed drupal from the first server, and manually install, with a new db etc. just to see if that was it. I hate to tear the whole engine out of the car and put a new one in, so to speak, but I just can't see what else to do on this one. Maybe it is as simple as a setting in mysql, that the auto installer didn't think about?

I really do appreciate the feedback from you guys! I am of course still open to any suggestions, as I would rather not remove and reinstall drupal. :-)

YT2S

That is pretty wacky.

dougzilla - April 30, 2009 - 19:08

That is pretty wacky.

 
 

Drupal is a registered trademark of Dries Buytaert.