Permanently protected template

Template:Get globals

From Historical Hastings
Template documentation[view] [edit] [history] [purge]
Passed as a parameter into large templates such as {{showfacts person}} or {{showfacts children}}, this function loads properties (possibly laboriously calculated) from the /sensor subpage into a global variables string array whose elements may be accessed with an #explode call. Preloading all values once into a global array reduces SMW calls, thereby increasing performance.
A string array delimited within the special character sequence" ₧₯<variable name>::<value>₯₧ " Values are delimited, but #show returns them. Example:
₧₯age at death::39₯₧₧₯hint_tabs::tree,ancestors....
Accessing the array; examples
Test if values exist: {{#pos:{{{globals|}}}|₧₯hint_tabs::}}
list of values {{#explode:{{#explode:{{{globals|}}}|₧₯hint_tabs::|1}}|₯₧|0}}
Subroutine /make list takes a single array member enumeration parameter:
  • list: itemizes the properties returned by the function. First element is unused.