Jump to content

Template:Portal/testcases

Rendered with Parsoid
From Wikipedia, the free encyclopedia

No parameters

[edit]
No parameters
{{Portal}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Different portals

[edit]

One existing portal

[edit]
Politics
{{Portal|Politics}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

One non-existent portal

[edit]
Non-existent portal
{{Portal|Non-existent portal}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Portal alias, one of multiple aliases for the same portal

[edit]
Georgia USA
{{Portal|Georgia USA}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Portal starting with number

[edit]
1990s
{{Portal|1990s}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Portal starting with diacritic

[edit]
Éire
{{Portal|Éire}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Ten portals

[edit]

Twenty portals

[edit]

No portals, parameter nominimum

[edit]
|nominimum=yes
{{Portal|nominimum=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
|nominimum=1
{{Portal|nominimum=1}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Non-standard inputs

[edit]

Nowiki markup

[edit]
<nowiki/>
{{Portal|<nowiki/>}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Line breaks only

[edit]
Line breaks only
{{Portal|
}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Six portals with mixed line breaks

[edit]
Six portals with mixed line breaks
{{Portal
|Art
|Non-existent portal|
Science
|Japan
|Music|Sport}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
{{Portal |Art |Non-existent portal| Science |Japan |Music|Sport}} {{Portal/sandbox |Art |Non-existent portal| Science |Japan |Music|Sport}}

Non-ASCII characters

[edit]
文字
{{Portal|文字|redlinks=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

ParserFunctions

[edit]
ParserFunctions
{{Portal| Art }}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Long word

[edit]
Thisisareallylongwordwithnospacesorlinebreaksatall
{{Portal|Thisisareallylongwordwithnospacesorlinebreaksatall|redlinks=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Nil first parameter

[edit]
2=Politics
{{Portal|2=Politics}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Various whitespace and nil parameters

[edit]
{{Portal}}
{{Portal||  |Politics|
|Art| |9=Music |21=Sport}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Borders

[edit]
Empty no borders
{{Portal|border=no}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
No borders
{{Portal|A-League|Abu Dhabi|Atheism|Austria|border=no}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Adaptive

[edit]
Adaptive layout
{{Portal|Art|Biology}}
* <small>{{lorem ipsum span|1}}</small>

{{Portal}}

{{Portal|Art|Biology}} * <small>{{lorem ipsum span|1}}</small>

{{Portal/sandbox}}

{{Portal/sandbox|Art|Biology}} * <small>{{lorem ipsum span|1}}</small>

Testing named parameters

[edit]

Left-aligned

[edit]
|left=yes
{{Portal|Politics|left=yes}}
Side by side comparison
{{Portal}}
Adaptive layout, |left=yes
{{Portal|Politics|left=yes}}
<small>{{lorem ipsum span|1}}</small>

{{Portal}}

{{Portal|Politics|left=yes}} <small>{{lorem ipsum span|1}}</small>

{{Portal/sandbox}}

{{Portal/sandbox|Politics|left=yes}} <small>{{lorem ipsum span|1}}</small>

Custom margin

[edit]
|margin=5em 5em 5em 5em
{{Portal|Politics|margin=5em 5em 5em 5em}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Custom margin and left-aligned

[edit]
|left=yes + |margin=2em 2em 2em 2em
{{Portal||Politics|left=yes |margin=2em 2em 2em 2em}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

Break parameter

[edit]
|break=yes
{{Portal|Politics|break=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
[edit]
|redlinks=yes
{{Portal|Politics|Test|redlinks=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
|redlinks=include
{{Portal|Politics|Test|redlinks=include}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
|redlinks=1
{{Portal|Politics|Test|redlinks=1}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
|redlinks=false
{{Portal|Politics|Test|redlinks=false}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

São Paulo

[edit]
|redlinks=yes
{{Portal|São Paulo|redlinks=yes}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}
[edit]
Redlinks
{{Portal|Test 2|Test|Test 3|Test 4|Test 5}}
Side by side comparison
{{Portal}}{{Portal/sandbox}}

All parameters

[edit]
All parameters
{{Portal|Politics|Art|Music|Literature|border=no |break=yes |left=yes |margin=5em}}
Side by side comparison
{{Portal}}

Without the test cases mess

[edit]

Image function

[edit]