[pmwiki-devel] LinkUrl / LinkTxt question

The Editor editor at fast.st
Tue Feb 6 11:28:42 CST 2007


On 2/6/07, The Editor <editor at fast.st> wrote:
> On 2/6/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:

> Or a last option, is it possible to redefine LinkPageExistsFmt by a
> function that is passed linkurl, linktxt and pageurl, and rewrite the
> output in the formula using conditionals, etc.  Is that possible?

I thought I could get some traction with something like this, but
can't even begin to debug, as $PageUrl and $LinkText seem to be blank
values when processed this way... Rats!

$LinkPageExistsFmt = "<a class='wikilink' href='\$LinkUrl'>" .
hglink($PageUrl, $LinkText) . "</a>";

function hglink($u, $t) {
	global $ScriptUrl;
	if ($t == $u) return "U: $u";
	return "T: $t";
	}

I could take it from here if I could get these values for each link.
What am I doing wrong?

Cheers,
Dan



More information about the pmwiki-devel mailing list