[pmwiki-users] function PageTextVar & Fox
noskule at gmx.net
Wed Nov 19 09:43:19 CST 2008
Am Mittwoch 19 November 2008 10:58:43 schrieb Hans:
> 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
$pagename = ResolvePageName($pagename);
$SelfPagetype = PageTextVar($pagename, "pagetype");
hm, I did this, but unfortunate it don't work anymore nevertless if a pagename
is resolved or not.
Any Idea what's wrong?
More information about the pmwiki-users