Template:BCW page link: Difference between revisions

m
no edit summary
No edit summary
mNo 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 an anchor to the page; second parameter (index=1) is the text to show;  
   first parameter (index=0) is page number; second parameter (index=1) is the text to show;
-->{{#vardefine:anchor|{{#arrayindex:parameters|0}}}}<!--
   we use 'explode' function for pages like '36_2' to get only first part (actual page number), see Template:Page_aside_continues for details
   get actual page number from anchor, which could be like '36_2', see Template:Page_aside_continues for details
-->{{#vardefine:page|{{#explode:{{#arrayindex:parameters |0}}|_|0}}}}<!--
-->{{#vardefine:page|{{#explode:{{#var:anchor}}|_|0}}}}<!--
   set text to show;  
   set text to show;  
-->{{#switch: {{#arraysize:parameters}}  
-->{{#switch: {{#arraysize:parameters}}  
Line 19: Line 19:
  | 1 = {{#vardefine:text|BCW {{{volume}}}:{{#var:page}}}}
  | 1 = {{#vardefine:text|BCW {{{volume}}}:{{#var:page}}}}
}}<!--
}}<!--
-->[[{{{wiki_page|}}}#{{#var:page}}|{{#var:text}}]]</includeonly>
-->[[{{{wiki_page|}}}#{{#var:anchor}}|{{#var:text}}]]</includeonly>