[Pmwiki-users] Variables expansion in included files

Sébastien Pierre spierre
Tue Jul 29 08:38:58 CDT 2003

Le lundi, 28 juil 2003, ? 19:44 Europe/Paris, Patrick R. Michaud a 
?crit :

> Because the files are included from within PmWiki's PrintFmt function,
> you may need to declare embedded variables as global if you want the
> substitutions to take place:
>    <div class="small"><?php
>      global $PageUpdate; echo "Last update $PageUpdate"; ?></div>

Thanks for the tip (sorry for the $PageUpdate instead of $LastUpdated).
The $LastUpdated works, but other variables such as $PageUrl and 
$WikiUrl are expanded into "", while I have the following:

	global $PageUrl;
	global $WikiUrl;
	global $LastModified;
	echo "Page last modified $LastModified (<b><a 
href='$PageUrl?action=edit'>Edit</a></b> |
	<a href='$PageUrl?action=diff'>Revisions</a> |
	<a href=''>Help</a> |
	<a href='$WikiUrl/Main/SearchWiki'>Search</a> |
	<a href='$WikiUrl/Main/AllRecentChanges'>Changes</a>)

Is there something I did wrong ? Or maybe the *Url variables have to be 
accessed from somewhere else ?


  -- S?bastien

? I do admit that Stackless Python is an ideal environment for
*something*, but I'm not exactly aware of what this should
be like, exactly.?
<http://www.type-z.org>     -- Christian Tismer, stackless creator

More information about the pmwiki-users mailing list