[pmwiki-users] page text variables in config.php

Patrick R. Michaud pmichaud at pobox.com
Thu Feb 15 22:51:55 CST 2007

On Thu, Feb 15, 2007 at 10:34:06PM -0600, Jon Haupt wrote:
> I read in the documentation that I have to define $PageTextVarPatterns
> in config.php if I want to refer to a page text variable in
> config.php.  I'm trying to write something that will force PmWiki to
> determine which skin to use based on a page text variable.  I don't
> think I understand the correct syntax for PageTextVar().  Why doesn't
> this work?
> # special skin markup
> SDVA($PageTextVarPatterns, array(
>   'var:' => '/^:*(\\w[-\\w]*):[ \\t]?(.*)$/m',
>   '(:var:...:)' => '/\\(:(\\w[-\\w]*):\\s?(.*?):\\)/s'));
> $Blah = PageTextVar($pn,"Blah");

...where is $pn set?  (It needs to be the page for which
you want to retrieve $:Blah.)


More information about the pmwiki-users mailing list