[pmwiki-users] [pmwiki-devel] Creating site wide custom blocks

Hans design5 at softflow.co.uk
Fri Dec 7 09:09:00 CST 2007


Friday, December 7, 2007, 2:30:33 PM, Weldon wrote:

> Summary: I'm looking for two things: A way to define blocks globally, and
> unpreformatted text block syntax similar to [@ @] to apply to the block definition to.

You can define your bordereed coloured boxes as css classes within
pub/css/loca.css (create the file as  a normal text file if you have
not got one)

.orange_box { border:2px solid #de5502;
              background-color:#fed6be;
              color:#6d2a01;
            }

and use in wiki pages as a div like

>>orange_box<<
content....
>><<

or inline like

     %orange_box%content.....%%

You can also nest divisions.

Or you can define wiki styles from within config.php:

$WikiStyle['orange_box']['border'] = '2px solid #de5502';
$WikiStyle['orange_box']['background-color'] = '#fed6be';
$WikiStyle['orange_box']['color'] = '#6d2a01';

and use also as above.

Wiki styles are applied as style="..." in the HTMl tag, whereas
classes are applied as class="...", so are more efficient for page
loads.


Hans




More information about the pmwiki-users mailing list