[pmwiki-users] Getting an URL from a cookbook recipe

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Wed Jan 25 19:22:36 CST 2006


On Wed, 25 Jan 2006, Patrick R. Michaud wrote:

> > 	http://pmwiki.org/wiki/PmWiki/MakeLink
> 
> Yes, it will deserve its own page.

I've updated the above page, would you mind checking it.

> > Ok... I think I need some examples ;-)
> 
>     MakeLink($pagename, "SomePage")
>       returns  "<a href='.../Group/SomePage'>SomePage</a>"

What about $suffix, is that simply:

     MakeLink($pagename, "some page", "other text", "-suffix")
       returns  "<a href='.../Group/SomePage'>other text-suffix</a>"

and perhaps you can give an example for $fmt. Here's a guess:

     MakeLink($pagename, "SomePage", '', '',
	      "<a href='.../\$LinkUrl'>\$LinkText</a>")
       returns  "<a href='.../Group/SomePage'>SomePage</a>"


> > How does MakeLink() know the type of the link? Is $target matched to 
> > various regexps?
> 
> Warning: this gets a little tricky.  :-)

Your explanation was quite easy to follow, good work!

...

> Does that help, or just confuse things further?

I think the documentation of MakeLink() is almost done. Next time I'll ask 
you about LinkIMap() and LinkUpload() I think :-)

/C

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list