Template:BCW page link: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 10: Line 10:
   save parameters in array
   save parameters in array
-->{{#arraydefine:parameters|{{{#userparam|}}}|@@}}<!--
-->{{#arraydefine:parameters|{{{#userparam|}}}|@@}}<!--
   first parameter (index=0) is page number; second parameter (index=1) is the text to show
 
-->{{#vardefine:page|{{#arrayindex:parameters |0}}}}<!--
   first parameter (index=0) is page number; second parameter (index=1) is the text to show;
  we use 'explode' function for pages like '36_2' to get only first part (actual page number), see Template:Page_aside_continues for details
-->{{#vardefine:page|{{#explode:{{#arrayindex:parameters |0}}|_|0}}}}<!--
   set text to show;  
   set text to show;  
-->{{#switch: {{#arraysize:parameters}}  
-->{{#switch: {{#arraysize:parameters}}