Difference between revisions of "Template:Count and list"

From QBWiki
Jump to navigation Jump to search
m
m
Line 6: Line 6:
 
This list includes {{#var:blue_links}} blue links and {{#var:red_links}} red links.{{Load|red_links|blue_links|i|link}}</includeonly><noinclude>
 
This list includes {{#var:blue_links}} blue links and {{#var:red_links}} red links.{{Load|red_links|blue_links|i|link}}</includeonly><noinclude>
 
Given a list of fields (comma delimited), count the number of links which point to pages with exist and the number which point to pages that don't.
 
Given a list of fields (comma delimited), count the number of links which point to pages with exist and the number which point to pages that don't.
 +
 +
Currently breaks at 277 items - unclear how to resolve.
  
 
Incorporates [[Template:Exists]] to circumvent the "500 per page" limit of #ifexist.
 
Incorporates [[Template:Exists]] to circumvent the "500 per page" limit of #ifexist.
Line 12: Line 14:
 
! Input
 
! Input
 
! Output
 
! Output
|-
 
|<pre>{{Count and list|
 
X,
 
Y,
 
Z}}</pre>
 
|{{Count and list|
 
X,
 
Y,
 
Z}}
 
 
|-
 
|-
 
|<pre>{{Count and list|
 
|<pre>{{Count and list|
Line 30: Line 23:
 
2021 ACF Fall,
 
2021 ACF Fall,
 
2022 ACF Regionals}}
 
2022 ACF Regionals}}
 +
|-
 +
|<pre>{{Count and list|
 +
{{#loop:j|1|277|{{#var:j}},
 +
}}}}</pre>
 +
|{{Count and list|
 +
{{#loop:j|1|277|{{#var:j}},
 +
}}}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Revision as of 13:29, 26 August 2022

Given a list of fields (comma delimited), count the number of links which point to pages with exist and the number which point to pages that don't.

Currently breaks at 277 items - unclear how to resolve.

Incorporates Template:Exists to circumvent the "500 per page" limit of #ifexist.

Input Output
{{Count and list|
2020 ACF Fall,
2021 ACF Fall,
2022 ACF Regionals}}

This list includes 3 blue links and 0 red links.

{{Count and list|
{{#loop:j|1|277|{{#var:j}},
}}}}
Template:Count and list