PmWiki /

Conditional Markup

Rollspelssystem

Basic Roleplaying

Harnmaster

RuneQuest

Star Wars

T10-systemet

True20

The Master Series

Rollspelsmiljöer

Forgotten Realms

Grönland

Harn World

Hyboria

In Umbra Gigantis Morentis

Korsvägen

Western

Kampanjer

Övrigt

Rollspels hjälpmedel

Om RollspelsWiki

Conditional Markup

authors, admins (advanced)

Using the (:if:) Directive

The (:if:) directive allows portions of a page to be included or excluded from processing. The generic form of the (:if:) directive is

    (:if cond param:) body (:ifend:)

where “cond” names a condition to be tested (described below), and “param” is a parameter or other argument to the condition.

The built-in conditions include:

    (:if name [name]:)   - current page is named “name”
    (:if auth [level]:)  - viewer is authorized at “level”
    (:if authid:)        - current viewer is authenticated
    (:if true:)          - always include text
    (:if false:)         - always exclude text (same as a comment)
    (:if attachments:)   - current page has attachments

Negated forms of conditions also work

    (:if !attachments:) This page has no attachments

Any (:if:) automatically terminates the previous one, thus markup can be easily cased:

    (:if auth read:)* You can read
    (:if auth edit:)* You can edit
    (:if auth upload:)* You can upload
    (:ifend:)

admins (advanced)

Creating new conditions

See Cookbook:ConditionalMarkupSamples.

« InterMap | DocumentationIndex | Markup variables »

Sidan senast ändrad 2005-09-16 kl. 19:45

Denna webbplats och allt dess innehåll är upphovsrättsskyddat. © författarna 2005. Se vidare våra användarvillkor