[pmwiki-users] Execute & render markup from a php function
Peter & Melodye Bowers
pbowers at pobox.com
Wed Apr 2 11:40:26 CDT 2008
> I'm looking for a function to execute & render markup.
> ie : I would like to run {(plist groups=* -Site*.*
> sep=\n)}and get the
> result in a variable, ..
>
> Today, I need to execute 'powertools' markup, but markup
> could be anything
> else
> something like :
>
> $mymarkup= '{(plist groups=* -Site*.* sep=\n)}';
>
> $page['text'] =ExecuteMarkup($mymarkup);
> ...
> ...
The function you are looking for is in scripts/markupexpr.php and is called
MarkupExpression().
You would use it like this (note that you do not include the curly braces --
just the parentheses):
$mymarkup= '(plist groups=* -Site*.* sep=\n)';
$tmp = MarkupExpression($pagename, '(' . $e . ')');
Hope that helps.
-Peter
More information about the pmwiki-users
mailing list