[Pmwiki-users] a couple of questions
Jonathan Scott Duff
duff
Tue Nov 2 12:53:55 CST 2004
In pmwiki2,
1) Is it possible for a directive to set a skin? I'd like to be able to
do something like
Markup('skin','directives','/\\(:skin\\s+(\\w+):\\)/e',
"\$GLOBALS['PageSkinFmt'] = '$1'");
Such that (:skin foo:) anywhere on a page will cause that page to use
the foo skin.
(I've actually been able to achieve the effect I want here, but it
entails copying a chunk of code from scripts/tlayout.php. Could
pmwiki support this behavior natively?)
2) How do I create a directive that acts as a container? For instance,
if the directive were (:foo:), the following sequence:
(:foo:)XXX(:foo:)YYY
would generate HTML something like
<div class="foo">XXX</div><div class="foo">YYY</div>
Looking at the source, I thought it might be something like
$BlockMarkups['foo'] = array('<div class="foo">', '', '</div>');
Markup('foo','block','/\\(:foo:\\)/e',
"PZZ(\$GLOBALS['BlockMarkups']['foo'][0] = '<:foo>')"
but that doesn't work.
Any clues?
-Scott
--
Jonathan Scott Duff Division of Nearshore Research
duff at lighthouse.tamucc.edu Senior Systems Analyst II
More information about the pmwiki-users
mailing list