W3TPL/tag/let: Difference between revisions

From Woozle Writes Code
< W3TPL‎ | tag
Jump to navigation Jump to search
No edit summary
(formatting)
Line 1: Line 1:
==About==
==About==
* '''Action''': Assigns a value to a variable.
'''Action''': Assigns a value to a variable.
* '''Options''':
==Options==
** '''echo''': replace the tag with the resulting value
These are currently in flux, and documentation here may not reflect what actually works.
** '''index'''= treats ''name'' as an array, and specifies the element to use
===supported===
** '''name'''= name of variable to set
* '''echo''': replace the tag with the resulting value
** '''null''': set the variable to NULL
* '''index'''= treats ''name'' as an array, and specifies the element to use
** '''oparse''': parse the output (only has an effect if "echo" is present)
* '''name'''= name of variable to set
** '''self''': takes starting value from same variable, to allow unary operations
* '''null''': set the variable to NULL
 
* '''oparse''': parse the output (only has an effect if "echo" is present)
Currently unsupported:
* '''self''': takes starting value from same variable, to allow unary operations
** '''load''' (should probably be "fetch"): retrieve starting value from the current page's properties
===unsupported===
** '''save''' (should probably be "store"): store the result in the properties for the current page
These were not working with the current MediaWiki version when last tested:
* '''load''' (should probably be "fetch"): retrieve starting value from the current page's properties
* '''save''' (should probably be "store"): store the result in the properties for the current page

Revision as of 21:26, 31 December 2019

About

Action: Assigns a value to a variable.

Options

These are currently in flux, and documentation here may not reflect what actually works.

supported

  • echo: replace the tag with the resulting value
  • index= treats name as an array, and specifies the element to use
  • name= name of variable to set
  • null: set the variable to NULL
  • oparse: parse the output (only has an effect if "echo" is present)
  • self: takes starting value from same variable, to allow unary operations

unsupported

These were not working with the current MediaWiki version when last tested:

  • load (should probably be "fetch"): retrieve starting value from the current page's properties
  • save (should probably be "store"): store the result in the properties for the current page