logo       

Re: [pmwiki] Re: Question to new page format variables: msg#00066

web.wiki.pmwiki.user

Subject: Re: [pmwiki] Re: Question to new page format variables

On Sat, Jun 14, 2003 at 06:14:35PM +0200, Bernhard.Weichel@xxxxxxxxxxx wrote:
>
> I even would like to substitute
> PrintText($pagename, "[[PmWiki:PmWiki [[\$Version]]]]")
> by
> PrintFmt($pagename, "text:[[PmWiki:PmWiki [[\$Version]]]]")

Believe it or not, you can do it now with

PrintFmt($pagename,"function:PrintText [[PmWiki:PmWiki [[\$Version]]]]");

:-)

> By the way: shouldn't
> FmtPageName("\$action", $pagename)
> be also swapped to
> FmtPageName($pagename, "\$action");
> to be the similar to PrintFmt as you did with StartHTML.

I seriously thought about this, but FmtPageName is used in a *lot* of
places and is likely to have been used in many customized modules -- far
far more than StartHTML. If I had it to do over again I'd probably
go for consistency, but I thought that this would be just a bit too
radical a change to implement. This way the FmtPageName function
also somewhat matches the arguments of the FmtWikiLink and FmtUrlLink
functions.

> >> 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)?
>
> Could we make a function like
> LookupFmt("wiki:Main.Homepage your.page his.page")
> LookupFmt("file:local/foo/bar foo/bar")
> which returns the first alternative found?

Maybe, I'll have to think on this one a bit.

Pm




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

News | FAQ | advertise