1 MediaWiki & Semantic MediaWiki Parser Test Page[edit | edit source]
This page is intentionally verbose.
Its purpose is to test **parser functions, magic words, templates, and Semantic MediaWiki features**.
1.1 Basic Text & Formatting[edit | edit source]
Bold · Italic · Bold Italic
- Item 1
- Item 2
- Subitem
- Numbered
- List
Inline code: Parser functions
Preformatted:
{{CURRENTDAY}}-{{CURRENTMONTH}}-{{CURRENTYEAR}}
- Magic Words & Variables ==
| Name | Result |
|---|---|
| PAGENAME | Parser functions |
| FULLPAGENAME | Parser functions |
| NAMESPACE | |
| NAMESPACENUMBER | 0 |
| BASEPAGENAME | Parser functions |
| SUBPAGENAME | Parser functions |
| CURRENTTIME | 04:16 |
| CURRENTTIMESTAMP | 20260509041612 |
- ParserFunctions – Conditionals ==
1.1.1 #if[edit | edit source]
TRUE branch
NOT EMPTY
1.1.2 #ifeq[edit | edit source]
Equal
Different
1.1.3 #ifexpr[edit | edit source]
Five is greater
Math OK
- ParserFunctions – Expressions & Math ==
- 2 + 2 = 4
- 10 / 3 = 3.3333333333333
- Rounding: Expression error: Unexpected round operator.
- Random: Expression error: Unrecognized word "rand".
- Switch / Case Logic ==
🍎 Apple
- String Functions (StringFunctions extension) ==
- Length: 11
- Substring: Hello
- Replace: Hello Wiki
- Position: 6
- Lowercase: hello
- Uppercase: HELLO
- Capitalize: Hello
- Arrays (Arrays extension) ==
- Fruit count: 1
- First fruit: apple
- All fruits:
- Loops (ParserFunctions) ==
1.1.4 #for[edit | edit source]
{{#for: i|1|5|* Iteration }}
1.1.5 #while[edit | edit source]
Maximum number of loops have been performed
- Templates ==
Template call example:
```wiki
Param1:value1, Param2:value2
``