[Pmwiki-users] Links in template pages

Patrick R. Michaud pmichaud
Tue Sep 7 06:59:30 CDT 2004


On Tue, Sep 07, 2004 at 03:45:03PM +0400, Ilya Zverev wrote:
> One more dumb question, sorry :)
> 
> I'm trying to add a link in the template to display 'Discussion' page,
> where users can discuss any Wiki page (except discussion pages). So, I
> used <!--function:DiscussLink--> inside the template, and in function
> wrote something like
>   print FmtWikiLink(NULL, 'Discussion', 'Discuss');
> [...]
> So, the question is: is there a way to do Wiki links from the script
> look correctly? How should the DiscussLink function be implemented?

How about putting the following in your template (in place of the
<!--function:...--> you wrote above):

   <a href='$PageUrl-Discussion'>Discuss</a>

It won't do the ?-link if the discussion page doesn't exist, but if
someone follows the "Discuss" link they'll be invited to edit it.
If it's really important to have the ?-link for a non-existent
discussion page, let me know and I'll come up with something.  :)

Pm



More information about the pmwiki-users mailing list