[pmwiki-users] Help with %dlcol% style for 2 column definitions

Dominique Faure dominique.faure at gmail.com
Tue May 9 02:09:39 CDT 2006


On 5/8/06, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> On Sun, 7 May 2006, Pico wrote:
>
> > 1. Is the %dlcol% style (used by Cookbook.Cookbook to create a two
> > column definition list) only available in certain groups (Cookbook,
> > Test, but not PmWiki)?
> >
> > 2. Can I define that style at the beginning of a page in another group
> > (PmWiki)?
> >
> > I saw the mailing list discussions about enabling it through changes to
> > config.php, but I thought those may have been added to the core by now
> > (I haven't checked the change log).
>
> I'm not sure what you saw on the list, but I use this in a config.php
>
> // Style definition list differently
> if(true) {      // Instead of including common.php
>   $HTMLStylesFmt['requirementlist'] = "
>   dl.reqlst dt { float:left; padding-right:0.5em; font-style: italic; }
>   dl.reqlst dd { margin-left:4em; width:50em; }\n";
>
>   $WikiStyle['requirementlist']['apply'] = 'list';
>   $WikiStyle['requirementlist']['class'] = 'reqlst';
> }
>
> This then allows me to write something like this:
>
>         : bla bla %reqirementlist%: bla bla bla
>
> However, since I'm using it a lot I actually do
>
>         %define=r requirementlist%%%
>         : bla bla %r%: bl
>
> You might be able to create this style using only '%define=...%'. If so,
> please let me know!
>

I enhanced your %reqirementlist% style a bit with:

$WikiStyleApply['descdata'] = 'dd';
$WikiStyle['descdata']['apply'] = 'descdata';

which allow customization of the 1st col width:

%define=dw descdata margin-left:5em%
: bla bla %reqirementlist%%dw%: bla bla bla
: bla bla %dw%: bla bla bla

And in the same mood, but using list items and only '%define=...%':

%define=history apply=list class=historylist list-style=none margin-left=8em%
%define=hdt float=left font-weight=bold width=7em margin-left=-7em%
* %history%%hdt% 2005-06-01 %% bla bla bla.
* %hdt% 2005-06-03 %% bla bla bla.

Regards,
Dom




More information about the pmwiki-users mailing list