[pmwiki-users] div text pattern

John Rankin john.rankin at affinity.co.nz
Sun Nov 30 18:15:07 CST 2008

>Date: Sat, 29 Nov 2008 12:27:53 +0100
>From: noskule <noskule at gmx.net>
>Subject: [pmwiki-users] div text pattern
>hi list
>Is there a TextPattern variable where I could configure div markup like thre is 
>for conditions ($CondTextPattern).
>I would like to use names instead of numbers for divs.
>(:div_container ...:)
>(:div ...:)
>thanks for any hints

I can think of 2 options that might work:

1. translate text suffixes into numbers

Something like this:

Markup('customdiv', '<table',

function MapDivSuffix($txt) {
  static $DivSuffix, $DivIndex;
  if (isset(@$DivSuffix[$txt]))
      return $DivSuffix[$txt];
  $DivSuffix[$txt] = $DivIndex;
  return $DivSuffix[$txt];

2. redefine the table markup rule

Something like this:

Markup('table', '<block',
    "Cells('$1', PSS('$2'))");

Hope this helps
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
john.rankin at affinity.co.nz

More information about the pmwiki-users mailing list