Properties

Summary: How to have your own set of properties/variables in wiki pages
Version:
Prerequisites:
Status:
Maintainer:
Categories: Administration

Question

How can I have my own set of properties/variables in wiki pages?

Answer

  1. Download properties.phpΔ and save it in the cookbook directory
  2. When you run PmWiki/WikiFarms add include_once("$FarmD/cookbook/properties.php"); to your farmconfig.php or config.php. Otherwise add include_once("cookbook/properties.php"); to your config.php

Notes and Comments

  • This recipe was last tested on PmWiki version: 2.0.5
  • This recipe requires at least PmWiki version: 2.0

This recipe provides the following tools to handle properties:

  • (:properties name='some value' -erasedname ... :) markup
  • {$property name} variable replacement
  • (:if property name 'has value':) conditional markup
  • (:if propertyset name:) conditional markup

Details

(:properties name='some value' -erasedname ... :)
This markup initializes named properties/variables to provided values or erase previously set values.
Several initializations/erasing could be made at the same time. Values containing spaces must be quoted.
{$property name}
This (pseudo) variable replacement displays the current value of the named properties/variable.
(:if property name 'has value':)
This conditional markup enables page fragment display according to the specified value. Values containing spaces must be quoted..
(:if propertyset name:)
This conditional markup enables page fragment display according to whether the property has been set.

Contributors

Dfaure
BrendanGibson

History

05/09/04
Initial release
28/10/05
Added propertyset

See Also

Discussion


Category: