DNNStuff Documentation WikiVisit DNNStuff
RSS

Contents


Tools




Quick Search
»
Advanced Search »

Tag Cloud

Aggregator DNNStuff Favorites Inject Anything Module Rotator SQLView Pro Welcome


PoweredBy

Logic Token Syntax

RSS
Modified on 2010/08/19 09:09 by dnnstuffadmin Categorized as Uncategorized

Logic Tokens

Logic tokens are a powerful way to include some rudimentary logic within your content.

There are a number of different logic token formats. Each logic token acts upon the value or existence of a content token. The best way to explain logic tokens is to provide some examples. These examples will all be relative to a token named [MYTOKEN].

  • [IFMYTOKEN value="test"][/IFMYTOKEN]
    • if [MYTOKEN] exists and the value equals "test" then the content between the tags will be rendered

  • [IFNOTMYTOKEN value="test"][/IFNOTMYTOKEN]
    • IF [MYTOKEN] exists and the value doesn't equal "test" then the content between the tags will be rendered

Logic Token Examples

Example 1

Tags:

[TEST] = "1234"

Content is:

[IFTEST value="1234"]The TEST tag exists and equals [TEST][/IFTEST]

Results in:

The TEST tag exists and equals 1234

Example 2

Tags:

[TEST] = "1234"

Content is:

[IFTEST value="6666"]The TEST tag exists and equals [TEST][/IFTEST]

Results in:

No content rendered

ScrewTurn Wiki version 3.0.4.560. Some of the icons created by FamFamFam.