Posted on: 01/31/06 10:35am
By: Anonymous (sgtpepper)
I have the following code placed in blockheader.thtml
$test = '{block_title}';
if ( $test == "Menu" ) {
print "
";
}
?>
Basically, this replaced the block title with an image. It works fine on the left blocks.....but doesnt work on the right blocks? Anybody have any ideas?
Custom blockheader code
Posted on: 01/31/06 01:26pm
By: machinari
my guess:
the left blocks are loaded from your header, which will have its PHP evaluated, while the right blocks are loaded from the footer, which does not have inserted PHP evaluated. something like that I think
Custom blockheader code
Posted on: 01/31/06 02:08pm
By: Dirk
Machinari's answer was spot-on. Officially, PHP is only supported in header.thtml. It just happens to work in all templates that are included from header.thtml - and that includes the left blocks. You shouldn't count on that, though.
You didn't say what you were trying to do, but maybe
this[*1] will give you some ideas.
bye, Dirk
Custom blockheader code
Posted on: 01/31/06 11:23pm
By: suprsidr
I was able to do it with javascript
here[*2] .
but I was also thinking of something like this although I have not tried it:
<img src="yoursite.com/{block_title}.gif">
and have a gif or jpg for every block title.