Template:If in category/testcases
Appearance
This is the template test cases page for the sandbox of Template:If in category. 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: |
Note: This page is in Category:X1. Jean Walton is in Category:1914 births.
Just a category
[edit]Expected result: true
[edit]{{If in category|X1}}
{{If in category}}
yes
yes
{{If in category|Category:X1}}
{{If in category}}
yes
yes
Expected result: false
[edit]{{If in category|X2}}
{{If in category}}
{{If in category|Category:X2}}
{{If in category}}
With |page=
parameter
[edit]Expected result: true
[edit]{{If in category|1914 births|page=Jean Walton}}
{{If in category}}
yes
yes
Expected result: false
[edit]{{If in category|2024 births|page=Jean Walton}}
{{If in category}}
Second unnamed parameter
[edit]Expected result: true
[edit]{{If in category|1914 births|born in 1914|page=Jean Walton}}
{{If in category}}
born in 1914
born in 1914
Expected result: false
[edit]{{If in category|1970 births|born in 1970|page=Jean Walton}}
{{If in category}}
Third unnamed parameter
[edit]Expected result: true
[edit]Using |3=
[edit]{{If in category|1914 births|3=NOT born in 1914|page=Jean Walton}}
{{If in category}}
Using a blank second unnamed parameter
[edit]{{If in category|1914 births||NOT born in 1914|page=Jean Walton}}
{{If in category}}
Expected result: false
[edit]Using |3=
[edit]{{If in category|1970 births|3=NOT born in 1970|page=Jean Walton}}
{{If in category}}
NOT born in 1970
NOT born in 1970
Using a blank second unnamed parameter
[edit]{{If in category|1970 births||NOT born in 1970|page=Jean Walton}}
{{If in category}}
NOT born in 1970
NOT born in 1970
Second and third unnamed parameter
[edit]Expected result: true
[edit]{{If in category|1914 births|born in 1914|NOT born in 1914|page=Jean Walton}}
{{If in category}}
born in 1914
born in 1914
Expected result: false
[edit]{{If in category|1970 births|born in 1970|NOT born in 1970|page=Jean Walton}}
{{If in category}}
NOT born in 1970
NOT born in 1970