Last edited 4 days ago
by Max Mustermann

Parser functions

No categories assignedEdit

1 Magic words / variables[edit | edit source]

Name Result
PAGENAME Parser functions
FULLPAGENAME Parser functions
NAMESPACE
NAMESPACENUMBER 0
BASEPAGENAME Parser functions
SUBPAGENAME Parser functions
CURRENTTIME 08:05
CURRENTTIMESTAMP 20260509080538

2 Parser functions / conditionals[edit | edit source]

2.1 #if[edit | edit source]

TRUE branch

NOT EMPTY

2.2 #ifeq[edit | edit source]

Equal

Different

2.3 #ifexpr[edit | edit source]

Five is greater

Math OK

3 Expressions, math[edit | edit source]

  • 2 + 2 = 4
  • 10 / 3 = 3.3333333333333
  • Rounding: 9.88

4 Switch / case logic[edit | edit source]

Apple it is!

5 String Functions (StringFunctions extension)[edit | edit source]

  • Length: 11
  • Substring: Hello
  • Replace: Hello Wiki
  • Position: 6
  • Lowercase: hello
  • Uppercase: HELLO
  • Capitalize: Hello

6 Arrays (Arrays extension)[edit | edit source]

  • Fruit count: 1
  • First fruit: apple
  • All fruits:

7 Loops (ParserFunctions)[edit | edit source]

7.1 #for[edit | edit source]

{{#for: i|1|5|* Iteration }}

7.2 #while[edit | edit source]

Maximum number of loops have been performed

8 Templates[edit | edit source]

Template call example:

Param1:value1, Param2:value2

9 SMW[edit | edit source]

{{#set:
| Has string = Example text
| Has number = 42
| Has boolean = true
| Has date = 2026-05-04
| Has page = Main Page
}}

9.1 ask[edit | edit source]

9.1.1 Simple query[edit | edit source]

 Has stringHas numberHas date
Parser functionsExample text422026-05-04

9.1.2 Filtered query[edit | edit source]

 Has number
Parser functions42

9.1.3 Aggregates[edit | edit source]

 TotalAverage
Parser functions4242

9.2 page context[edit | edit source]

Page has value: 42 Page has date: 2026-05-04

9.3 Conditional display[edit | edit source]

Number is greater than 40Parser functions