[pmwiki-users] how to access configuration variables from skin scripts
5ko at 5ko.fr
5ko at 5ko.fr
Sun Feb 26 05:18:28 CST 2012
a.sonderhoff at gassi-tv.de writes:
> 1) Basically I have a lot of <!--file:somephp.php--> in my tmpl to fire the
> scripts that merge the page variables and PTVs with the html/css. The
> functions described in the link given above work just fine, configuration
> variables (such as $FarmD, $SkinDirUrl, etc.) however are not accessible.
Add at the beginning of your scripts
global $FarmD, $SkinDirUrl;
> a limitation as I do not need the output produced by <!--PageText--> in all
> of the tmpl files ... Omitting the
> PageText special directive results in PmWiki outsmarting me and inserting
> the PageText content just before the </body> tag. Is there any way to force
> PmWiki to not output the PageText in certain tmpl’s?
You can add this in config.php - possibly conditionnally :
$HandleBrowseFmt = array(&$PageStartFmt, &$PageRedirectFmt, &$PageEndFmt);
Petko
More information about the pmwiki-users
mailing list