Extension:ArticlePlaceholder/Module:AboutTopic

The ArticlePlaceholder extensions provides the option to override the functions used to render an entity to display it on a generated local page (placeholder).

The module Module:AboutTopic per default uses the entityRenderer provided by the ArticlePlaceholder extension. It is possible to use a custom entityRenderer or to overwrite each part of ArticlePlaceholder's entityRenderer separately.

The following diagram represents all available functions and their connections. The blue ovals are the functions provided by Wikibase Client's Lua Scribunto interface.



For every function in the graphic there are setters and getters. Following is the documentation of the default functions provided by the entityRenderer, the setter functions as well as a list of all getters. All setter functions take a function as parameter. The getter functions return a function.

Example
In case that all top images should be exchanged with a certain kitten image the topImageRenderer (see Default functions) would be overwritten using the function setTopImageRenderer (see Setter functions) and the module Module:AboutTopic would look like the following:

Default functions
The functions, that can be get and set in the Module:AboutTopic are depending on each other. Therefore it might be useful to read through the default functions' documentation when overwriting these.


 * The  renders the image on the top right (in left to right languages) and takes a table and two strings as arguments. It is one of the four functions the renderEntity calls.
 * : render a list of statements, takes a table as argument
 * : render a list of external identifier, takes a table as argument
 * : render the description of an item, takes an string as argument
 * : render the best (preferred rank if present, otherwise all normal rank) statement, takes a table and a string as argument
 * : render a given statement, takes a table as argument
 * : render a statement containing images, takes a table and a string as arguments
 * : render the qualifier of a statement, takes a table as argument
 * : render the references of a statement, takes a table as argument
 * : render the labels of entities, takes a string as argument
 * : render the snaks, takes a table as argument