This page describes how a WikiAdministrator can define WikiStyles in the configuration file you can use on all PmWiki pages.
All predefined WikiStyles are setup in the global array $WikiStyle
.
To define your own WikiStyles, add the setting of the correspondent WikiStyle within the array.
the following array-values are set by scripts/wikistyles.php using the SDV()-function (so you can overwrite them by setting them prior in config.php or farmconfig.php):
text colors: (equiv. to %color=xxxx define=xxxx% | |
WikiStyle: | array setup: |
%black% | $WikiStyle['black']['color'] = 'black' |
%white% | $WikiStyle['white']['color'] = 'white' |
%red% | $WikiStyle['red']['color'] = 'red' |
%yellow% | $WikiStyle['yellow']['color'] = 'yellow' |
%blue% | $WikiStyle['blue']['color'] = 'blue' |
%gray% | $WikiStyle['gray']['color'] = 'gray' |
%silver% | $WikiStyle['silver']['color'] = 'silver' |
%maroon% | $WikiStyle['maroon']['color'] = 'maroon' |
%green% | $WikiStyle['green']['color'] = 'green' |
%navy% | $WikiStyle['navy']['color'] = 'navy' |
%purple% | $WikiStyle['purple']['color'] = 'purple' |
open links in a new browser-window: | |
%newwin% | $WikiStyle['newwin']['target'] = '_blank' |
turns markup into a comment via display:none css | |
%comment% | $WikiStyle['comment']['display'] = 'none' |
list-styles: | |
%decimal% | $WikiStyle['decimal']['apply'] = 'list' $WikiStyle['decimal']['list-style'] = 'decimal' |
%roman% | $WikiStyle['roman']['apply'] = 'list' $WikiStyle['roman']['list-style'] = 'lower-roman' |
%ROMAN% | $WikiStyle['ROMAN']['apply'] = 'list' $WikiStyle['ROMAN']['list-style'] = 'upper-roman' |
%alpha% | $WikiStyle['alpha']['apply'] = 'list' $WikiStyle['alpha']['list-style'] = 'lower-alpha' |
%ALPHA% | $WikiStyle['ALPHA']['apply'] = 'list' $WikiStyle['ALPHA']['list-style'] = 'upper-alpha' |
TODO: description of second index = "apply" or "class" - seems to be special ? -KAL
sample: If you're wanting to do the same as
%define=projectentry color:red%
, use
$WikiStyle['projectentry']['color'] = 'red';
If you're wanting to define a new style to be the same as %projectentry color=red%
, use
$WikiStyle['mynewstyle']['class'] = 'projectentry'; $WikiStyle['mynewstyle']['color'] = 'red';
We might need to introduce a or markup for this to style just the divs and not the enclosing <dl>'s. You can actually add this in a local customization by doing:
$WikiStyleApply['div'] = 'div';
or
$WikiStyleApply['indent'] = 'div';
$WikiStyle['mynewstyle']['bgcolor'] = 'colorname';
<< Custom Markup | PmWiki.DocumentationIndex | Upgrading >>