Template:Portal/testcases
Appearance
Rendered with Parsoid
This is the template test cases page for the sandbox of Template:Portal. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
No parameters
[edit]No parameters
{{Portal}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Different portals
[edit]One existing portal
[edit]Politics
{{Portal|Politics}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
One non-existent portal
[edit]Non-existent portal
{{Portal|Non-existent portal}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Portal alias, one of multiple aliases for the same portal
[edit]Georgia USA
{{Portal|Georgia USA}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Portal starting with number
[edit]1990s
{{Portal|1990s}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Portal starting with diacritic
[edit]Éire
{{Portal|Éire}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Ten portals
[edit]Ten Portals
{{Portal|Australia|Biography|Japan|Korea|Olympics|Philippines|United States|Alaska|World War I}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Twenty portals
[edit]Twenty Portals
{{Portal|Australia|Biography|Japan|Korea|China|Vietnam|Olympics|Philippines|United States|Alaska|World War I|Asia|Sports|Association football|Athletics|English football|Baseball|Basketball|Cricket}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
No portals, parameter nominimum
[edit]|nominimum=yes
{{Portal|nominimum=yes}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
|nominimum=1
{{Portal|nominimum=1}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Non-standard inputs
[edit]Nowiki markup
[edit]<nowiki/>
{{Portal|<nowiki/>}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Line breaks only
[edit]Line breaks only
{{Portal| }}
{{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}}
{{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}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
ParserFunctions
[edit]ParserFunctions
{{Portal| Art }}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Long word
[edit]Thisisareallylongwordwithnospacesorlinebreaksatall
{{Portal|Thisisareallylongwordwithnospacesorlinebreaksatall|redlinks=yes}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Nil first parameter
[edit]2=Politics
{{Portal|2=Politics}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Various whitespace and nil parameters
[edit]{{Portal|| |Politics| |Art| |9=Music |21=Sport}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Borders
[edit]Empty no borders
{{Portal|border=no}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
No borders
{{Portal|A-League|Abu Dhabi|Atheism|Austria|border=no}}
{{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}}
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}}
{{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}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Break parameter
[edit]|break=yes
{{Portal|Politics|break=yes}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Show redlinks
[edit]|redlinks=yes
{{Portal|Politics|Test|redlinks=yes}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
|redlinks=include
{{Portal|Politics|Test|redlinks=include}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
|redlinks=1
{{Portal|Politics|Test|redlinks=1}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
|redlinks=false
{{Portal|Politics|Test|redlinks=false}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
São Paulo
[edit]|redlinks=yes
{{Portal|São Paulo|redlinks=yes}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
Redlinks
[edit]Redlinks
{{Portal|Test 2|Test|Test 3|Test 4|Test 5}}
{{Portal}} | {{Portal/sandbox}} |
---|---|
All parameters
[edit]All parameters
{{Portal|Politics|Art|Music|Literature|border=no |break=yes |left=yes |margin=5em}}