[pmwiki-users] Making some text stand out in a box

Jan Erik Moström lists at mostrom.pp.se
Wed Nov 1 16:22:28 CST 2006


I'm currently working on a wiki which I will use to display 
source code examples in different programming languages (not PHP 
though ... so far I've never learned it) and I'm using the 
sourceblock recipe to do syntax highlighting. The result is very 
nice, but I don't really know how to best handle the display of 
text output.

What I would like to have a basically a plain box similar to 
what the sourceblock recipe generates. I looked at the 
WikiStyleExamples page and found something that would work for me:

%block define=coderesult bgcolor=#ffcc99 border='1px solid gray' padding=5px%

%coderesult%[@
Hello world
@]

But since I'm going to have this type of boxes on several pages 
I tried to set this style using $WikiStyle and came up with this

$WikiStyle['coderesult']['bgcolor'] = '#ffcc99';
$WikiStyle['coderesult']['border']  = '1px solid gray';
$WikiStyle['coderesult']['padding'] = '5px';

Which seem to partly work (no errors is printed and 'Hello 
world' can be seen on the page ;-) but I don't get the colored 
box that I get with the first definition. Can anyone tell me 
what I'm missing?

                             jem




More information about the pmwiki-users mailing list