Template:BCW page link: Difference between revisions

From Teopedia
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}}  

Revision as of 08:17, 28 September 2023

This template makes a design of the link to the certain page in "H. P. Blavatsky Collected Writings". It is used in {{BCW-page}}.


Design depends on number of parameters passed:

  • one, just page number – make link text as such: “BCW 1:45”
  • two, page and text to show – show the second parameter