Template:Nav-group: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 57: | Line 57: | ||
Additional parameters can be generated with: | Additional parameters can be generated with: | ||
<pre> | <pre> | ||
var itterations=25; | |||
var base='--></noinclude>{{#if:{{{%s|}}}{{{%slink|}}} | • |}}{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--'; | |||
var output = '--></noinclude>{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--'.split('%s').join(2); | |||
for (var i=3; i<=itterations ; i++ ) { | |||
output = output + '\r\n'+base.split('%s').join(i); | |||
} | |||
console.log(output); | |||
</pre> | </pre> | ||
</noinclude> | </noinclude> |
Revision as of 10:23, 7 August 2020
Example:
To be used in a Template:nav.
Parameters:
- 1: Name of the group
- 2..n: Entry in the group. Automatically linkified.
- postappend: What to append every name with. (e.g. "Heat Stress" as text, "Heat Stress Overlay" as link, postappend should be " Overlay")
- group: Title or link, if this is a main group indicator. Should not be used along with 2...n.
Additional parameters can be generated with:
var itterations=25; var base='--></noinclude>{{#if:{{{%s|}}}{{{%slink|}}} | • |}}{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--'; var output = '--></noinclude>{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--'.split('%s').join(2); for (var i=3; i<=itterations ; i++ ) { output = output + '\r\n'+base.split('%s').join(i); } console.log(output);