logo       

Re: Question to new page format variables: msg#00061

web.wiki.pmwiki.user

Subject: Re: Question to new page format variables

On Sat, Jun 14, 2003 at 08:37:30AM +0200, Bernhard Weichel in pmwiki-users
wrote:
> Now my questions:
>
> 1. does it matter (e.g. is there a performance impact) if I use
>
> PrintFmt($pagename, "wiki:\$Group.\$Title") versus
> PrintWikiPage("\$Grouip.\$Title")
>
> If it doesn't matter, why do we need PrintWikiPage?

Well, I had never really intended for people to call PrintFmt directly
(although I certainly don't exclude the possibility). For example,
instead of doing

<?php PrintFmt($pagename, "function:PrintGeneralMenu"); ?>

I would've written

<?php PrintGeneralMenu($pagename); ?>

using PHP's built-in function calling syntax. Similarly, instead of

<?php PrintFmt($pagename, "file:somefile.php"); ?>

I would expect

<?php include("somefile.php"); ?>

However, there is no PHP equivalent function for displaying a wiki page,
so I wrote one and called it PrintWikiPage(), thinking that would be
easier for most people than calling PrintFmt().

> 2. If I use PrintFmt($pagename, "wiki:\$Group.Menu default.Menu")
> Is there a way to find out which page is actually printed. This is
> important
> since I want to specify e.g. a general link to "Edit Menu" within the
> function
> PrintGeneralMenu.

At present, no. I could modify PrintWikiPage or PrintText to set a
global variable containing the name of the page that is actually being
printed (if so, what should it be called)?

Pm




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise