[pmwiki-devel] Disabling a recipe on one page only.

Peter Bowers pbowers at pobox.com
Wed Jun 10 11:07:47 CDT 2009


2009/6/9 Simon <nzskiwi at gmail.com>
>
> I want to run the original on one page only (include once in
> Groupname.PageName.php),
> (http://kiwiwiki.co.nz/pmwiki/pmwiki.php/Test/ProtectEmailOriginal), -
> but there must be
> How do I 'uninclude'  for that specific page

Although the more "pmwiki-way" is to use group-specific or
page-specific config files, I find it less confusing to just do
everything in config.php.

$pagename = ResolvePageName($pagename);
if ($pagename == 'MyGroup.MyPage')
   include_once("$FarmD/cookbook/ProtectEmail.php");
else
   include_once("$FarmD/cookbook/ProtectEmailModified.php");

The ResolvePageName() must be done before using $pagename to ensure a
standardized page name (i.e., period instead of slash, etc.)

-Peter



More information about the pmwiki-devel mailing list