Difference between revisions of "Template:List lookup helper"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) (Created page with "{{#vardefine:page_name|{{{1}}}}}{{#vardefine:loaded_page|{{:{{#var:page_name}}}}}}{{#vardefine:minindex|0}}{{#vardefine:maxindex|1}}<!-- Find the upper bound of the size in st...") |
Kevin Wang (talk | contribs) m |
||
| Line 17: | Line 17: | ||
{{Template doc| | {{Template doc| | ||
Given a list page, loads it exactly once and sets up enough variables it will not need to be loaded again to retrieve any entry. | Given a list page, loads it exactly once and sets up enough variables it will not need to be loaded again to retrieve any entry. | ||
| + | * page_name - the page name provided as arg1 | ||
| + | * loaded_page - the text of page_name | ||
* length - the length of the list | * length - the length of the list | ||
* entry_i - the entry in the list at position ''i'', where i is in <nowiki>[1, length-1]</nowiki> (0-indexed) | * entry_i - the entry in the list at position ''i'', where i is in <nowiki>[1, length-1]</nowiki> (0-indexed) | ||
Revision as of 18:30, 14 December 2025
Template documentation
Given a list page, loads it exactly once and sets up enough variables it will not need to be loaded again to retrieve any entry.
- page_name - the page name provided as arg1
- loaded_page - the text of page_name
- length - the length of the list
- entry_i - the entry in the list at position i, where i is in [1, length-1] (0-indexed)
{{:QBWiki:Quick links/lingo}}
{{List lookup helper|QBWiki:Quick links/lingo}}
{{#var:length}}
{{#loop:jj|1|{{#var:length}}|{{#var:entry_{{#var:jj}}}}<br/>}}
- Wondering why people keep saying "m"?
- Confused what a "vulcher" is?
- Want to find out about "superpowers"?
- Wondering just what makes something "important"?
- Heard something about the "canon"?
5
Wondering why people keep saying "m"?
Confused what a "vulcher" is?
Want to find out about "superpowers"?
Wondering just what makes something "important"?
Heard something about the "canon"?