Difference between revisions of "Template:Sublist"

From QBWiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{Add|sublist_index|1}}{{#vardefine:sublist_{{#var:sublist_index}}|{{{1|}}}}}{{{1|}}}<noin<nowiki/>clude> Index of sublist: {{#var:sublist_index}} Length of subl...")
 
m
Line 1: Line 1:
 
<includeonly>{{Add|sublist_index|1}}{{#vardefine:sublist_{{#var:sublist_index}}|{{{1|}}}}}{{{1|}}}<noin<nowiki/>clude>
 
<includeonly>{{Add|sublist_index|1}}{{#vardefine:sublist_{{#var:sublist_index}}|{{{1|}}}}}{{{1|}}}<noin<nowiki/>clude>
Index of sublist: {{#var:sublist_index}}
 
 
 
Length of sublist: {{#len:{{{1|}}}}}</noinclude></includeonly><noinclude>
 
Length of sublist: {{#len:{{{1|}}}}}</noinclude></includeonly><noinclude>
 
{{Template doc|
 
{{Template doc|
 
An attempt to get around the 1000 character limit for functions in [https://www.mediawiki.org/wiki/Extension:ParserFunctions/String_functions ParserFunctions] when constructing a list that can be accessed with [[Template:List lookup helper|List lookup helper]].
 
An attempt to get around the 1000 character limit for functions in [https://www.mediawiki.org/wiki/Extension:ParserFunctions/String_functions ParserFunctions] when constructing a list that can be accessed with [[Template:List lookup helper|List lookup helper]].
  
For long lists, subsections should be split into  
+
For long lists, subsections should be split into sections of less than 1000 characters - this template should include the length of the content wrapped in "noinclude" tags to prevent it from being transcluded.
  
 
<pre>
 
<pre>

Revision as of 16:05, 20 December 2025

Template documentation

An attempt to get around the 1000 character limit for functions in ParserFunctions when constructing a list that can be accessed with List lookup helper.

For long lists, subsections should be split into sections of less than 1000 characters - this template should include the length of the content wrapped in "noinclude" tags to prevent it from being transcluded.

{{Sublist|*entry 1}}
{{#var:sublist_index}}: {{#var:sublist_1}}
{{Sublist|*entry 2}}
{{#var:sublist_index}}: {{#var:sublist_2}}
  • entry 1<noinclude>

Length of sublist: 8</noinclude> 1:

  • entry 1
  • entry 2<noinclude>

Length of sublist: 8</noinclude> 2:

  • entry 2