[Pmwiki-users] Which function to convert a link
Patrick R. Michaud
pmichaud
Thu Jun 3 07:18:29 CDT 2004
On Wed, Jun 02, 2004 at 07:14:59PM +0200, Gregory Watts wrote:
> Hi,
>
> I've played with the source code of trails.php to make it generate java
> code for the PEAR html tree menu. It works, but the links are not html
> link but wiki link ( [[Group/Page]] ).
>
> Which function should I call to transform those links? I use the
> 'ReadTrail' function from trails.php to get the structure of the list I
> transform. This function uses 'FmtWikiLink', I thought it was
> responsible of transforming the wiki markup in html markup.
If you have a full pagename, the easiest way to get the URL for the pagename
is to use FmtPageName:
$url = FmtPageName('$PageUrl',$name);
You can even create the entire <a ...> tag:
$link = FmtPageName("<a href='\$PageUrl'>\$PageName</a>",$name);
Pm
More information about the pmwiki-users
mailing list