User Tools

Site Tools


columns_ui:config:global_variables

Differences

This shows you the differences between two versions of the page.


columns_ui:config:global_variables [2018/07/25 18:18] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Global variables ======
 +===== About =====
 +Global variables were created as a way of speeding up playlist formatting, by separating the parts of formatting that is common to all your columns, and only processing it once per track instead of once per column. It works by defining variables which you can access in your column display strings.
  
 +===== Global variables string =====
 +This string, in the [[columns_ui:config:playlist_view:globals]] configuration page, is where you define your variables.
 +
 +==== Setting variables ====
 +
 +You can set variables in your global variables string using the ''$set_global()'' function.  The syntax is as follows:
 +
 +''$set_global(//variable name//,//variable value//)''
 +
 +Note: You can only define globals in the global string - i.e. you cannot access defined globals.
 +
 +The truth value of a call to ''$set_global()'' with the correct number of parameters is true.
 +
 +===== Accessing global variables =====
 +
 +You can access global variables in your display and style strings using the ''$get_global()'' function. The syntax is as follows:
 +
 +''$get_global(//variable name//)''
 +
 +where
 +  * //variable name// is the name of the variable as defined in the ''$set_global()'' function call
 +  * the return value is the //variable value//
 +
 +The truth value of a call to ''$get_global()'' with the correct number of parameters is true iff the variable has been set in a previous call to ''$set_global()'', irrespective of what the variable was set to.
columns_ui/config/global_variables.1274950039.txt.gz · Last modified: 2010/05/27 08:47 (external edit) · Currently locked by: 105.154.91.218