[pmwiki-devel] Making links

Eemeli Aro eemeli at gmail.com
Tue Aug 7 12:04:14 CDT 2007


I'm developing a recipe for dynamic navigation generation from a given
sitemap and for speed reasons I'm now working on caching the
intermediate results.

One part of what I'd like to do is convert a wikimarkup link to its
HTML equivalent as efficiently as possible. By this point in the
script I know that what I've got is some kind of link, essentially the
equivalent of $match[2] in ReadTrail of scripts/trails.php.

So, should I write my own function for converting the links, or is
there a way of restricting MarkupToHTML to a subset of the defined
markups? Currently I do the following, which I'm not quite happy with:

	$BlockMarkups['p'] = array('','','',0);
	$s = MarkupToHTML( $pagename, $match[2] );
	$BlockMarkups['p'] = array('<p>','','</p>',0);

eemeli



More information about the pmwiki-devel mailing list