[pmwiki-users] Custom variables in a page?
pmwiki at ben-amotz.com
Tue Feb 28 19:41:03 CST 2006
Patrick R. Michaud wrote:
> On Wed, Mar 01, 2006 at 12:45:29AM +0000, Hans wrote:
>> Wednesday, March 1, 2006, 12:09:06 AM, Robin wrote:
>>> Basically, a simple string substitution. This way, when I release a new
>>> version, I can just change the version in one place, and everything
>>> changes. I can then click on the Attach: link to upload the new version.
>>> Is this possible?
>> One possibility is to make use of pmwiki's XL function:
>> On page Site.Preferences or another page if you use a custom version,
>> add a key-value pair like
>> 'prog_version' => '0.17',
>> Now you can use $[prog_version] on any page and pmwiki translates
>> (replaces) it with 0.17.
>> works even in Attach links like
>> (note the square brackets, not curly ones)
> Ooooooh, XL translations! I hadn't thought of that! :-)
> I need to keep that in mind as a possibility in the context
> of page properties.
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
This also works with ConditionalMarkup!
(:if equal $[prog_version] 0.17:)
Evaluates as true and displays the enclosed text
More information about the pmwiki-users