[pmwiki-users] Inclusion of PHP file in template: $title is missing
Felix E. Klee
felix.klee at inka.de
Sat May 20 04:30:18 CDT 2006
I'm using pmwiki-2.1.5, and I'm trying to write a skin where the logo
that is displayed at the top is dependent on the page name: The HomePage
should display a different logo than on other pages, that may perhaps
not display any logo at all.
So, I included a PHP file into the template, using the following
command:
<!--file:pub/skins/pmwiki/logo.php-->
For testing purposes, It contains the following code:
<?php print_r(array_keys($GLOBALS)); ?>
Now, there are several problems:
* If I include the file using the line
<!--file:{$SkinDirUrl}/logo.php-->
that does not work. In fact, as it looks, specifying a complete URL
as path for the file seems to fail.
* As seen by the output of the included PHP file, the array $GLOBALS
does not contain either of the variables $Title, $Titlespaced, or
$FullName. Thus, I don't seem to be able to find out which page is
currently being displayed from within the PHP file.
I guess that I must be doing something wrong, but what?
--
Felix E. Klee
More information about the pmwiki-users
mailing list