Module:Authority control/config/doc
{{Authority control/related}}
 Contains configuation details for [[Module:Authority control]].
 
 === Syntax ===
 The syntax for the &lt;code&gt;p.config&lt;/code&gt; table is as follows:
 * Codename for identifier, inside quotation marks.
 * '''property =''' Wikidata property number, without the prefix P.
 * '''section =''' section number to place the identifier. See [[#List of sections]] for details.
 * '''pattern =''' [[mw:Extension:Scribunto/Lua reference manual#Patterns|Lua pattern]] of valid format for identifier. Note this is similar but not identical to a [[regular expression]]. If this is omitted, then the module will not check the validity of the identifiers.
 * '''link =''' the URL of the external page with details of the identifier. The code &lt;code&gt;$1&lt;/code&gt; will be replaced with the identifier.
 * '''label =''' the label for the link.
 * '''remark =''' a brief explanation of the authority control database, for use on the documentation of [[Template:Authority control]] only.
 
 === Example ===
 The syntax below generates a link to the [[Dictionary of Irish Biography]] in section 5. It gets its data from Wikidata property {{Q|P6829}} and identifiers need to be in the following form: 0, followed by 0 or 1, followed by 4 digits, possibly followed by a decimal point and then a letter from A to D.
 &lt;pre&gt;{'DIB',
   property = 6829,
   section = 5,
   pattern = '^0[01]%d%d%d%d%.?[A-D]?$',
   link = 'https://doi.org/10.3318/dib.$1.v1',
   label = 'Ireland',
 },&lt;/pre&gt;
 
 === Advanced parameters ===
 * '''patterns =''' if more than one Lua pattern is needed, then use the plural form of this argument and include the comma-separated list of patterns enclosed by curly braces.
 * '''prefix =''' a prefix to be included before the links. In this case numbers 1, 2, ... will be used as the labels and the '''label''' field will be ignored.
 * '''valid =''' the name of a custom Lua function in [[Module:Authority control/auxiliary|/auxiliary]] used to determine if the identifier is valid or not, in case the '''pattern''' method cannot be used. It should return &lt;code&gt;false&lt;/code&gt; if the identifier is invalid.
 * '''customlink =''' the name of a custom Lua function in [[Module:Authority control/auxiliary|/auxiliary]] which will produce the entire external link. It should return &lt;code&gt;false&lt;/code&gt; if the identifier is invalid.
 * '''suppressedbyproperty =''' if this identifier should not be displayed if other identifiers are present, then specify them here in a comma-separated list enclosed by curley braces.
 
 === List of sections ===
 The names of each section are defined by the &lt;code&gt;p.sectionNames&lt;/code&gt; function.
 {{#invoke:Authority control/documentation|sectiontable|config={{#ifeq:{{PAGENAME}}|Authority control/config|sandbox}}}}
 
 === Whitelists ===
 The whitelists are defined by the &lt;code&gt;p.whitelists&lt;/code&gt; function. The syntax is as follows:
 *'''code''' = {topic = '''topic QID''', properties = {'''property PIDs'''}}
 where
 * '''code''' is the code of the whitelist which is called via the {{para|show}} parameter.
 * '''topic QID''' is the Wikidata QID for the topic represented by the whitelist, without the Q prefix.
 * '''property QIDs''' is a comma-separated list of PIDs for the properties included in the whitelist (without the prefix P).
 
 For example, the whitelist for Italy is defined as:
 
 &lt;code&gt;it = {topic = 38, properties = {396, 3863, 1986, 8034}},&lt;/code&gt;
 
 The whitelist has code &lt;code&gt;it&lt;/code&gt;, represents {{Q|Q38}} and includes the following properties: {{Q|P396}}, {{Q|P3863}}, {{Q|P1986}}, {{Q|P8034}}.
 
 The currently recognised whitelists are listed below:
 {{#invoke:Authority control/documentation|whitelisttable|config={{#ifeq:{{PAGENAME}}|Authority control/config|sandbox}}}}
 
 === See also ===
 * [[Module:Authority control/auxiliary]]
 
 &lt;includeonly&gt;{{sandbox other||
 [[Category:Wikipedia authority control]]