[pmwiki-users] function PageTextVar & Fox

Hans design5 at softflow.co.uk
Wed Nov 19 03:58:43 CST 2008

Tuesday, November 18, 2008, 5:24:49 PM, noskule wrote:

> I defined  a variable to get a ptv of the current page:
>    $SelfPagetype = PageTextVar($pagename, "pagetype");

> this works as long a page is defined in the url:

> ...index.php/Group/Name

> id dosn't work if there is no page definition, this typically happens if one
> clicks on the wiki title.

> However, if I define de variable after I included fox it works no matter if a
> target is defined in the url or not

fox.php calls ResolvePageName at the beginning.

//in case page name is not resolved
$pagename = ResolvePageName($pagename);

You could do the same somewhere before your var definition,
perhaps early on in config.php


More information about the pmwiki-users mailing list