[pmwiki-users] defer recipe to local ookbook
Patrick R. Michaud
pmichaud at pobox.com
Fri Aug 25 15:44:51 CDT 2006
On Tue, Aug 22, 2006 at 10:05:18PM -0500, JB wrote:
> I there a way to get the farmconfig.php to include a
> recipe in the local wiki and not the one in the
> wikifarm cookbook directory when both of the recipes
> have the same filename?
Yes, of course. The following are always true:
## load from local wiki
include_once('cookbook/recipe.php');
## load from farm wiki
include_once("$FarmD/cookbook/recipe.php");
If you want to include a recipe from the farm cookbook
only if it's not in the local cookbook, you can do:
if (file_exists('cookbook/recipe.php'))
include_once('cookbook/recipe.php');
else
include_once("$FarmD/cookbook/recipe.php");
Pm
More information about the pmwiki-users
mailing list