Redigerer
Mal:Wikidata/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
== Advanced usage == The layout of the output from (a combination of) commands that have both a singular and a plural form (e.g. <code>property</code>/<code>properties</code>) can be customized by using a number of named flags, which are name-value pairs (i.e. <code>|flag=value</code>), that can be given anywhere {{module other|after the first command|inside the call}}. The table below shows the available named flags. To insert a space at the beginning or end of a <code>value</code>, use an underscore <code>_</code>. To get a literal underscore, escape it by placing a backslash <code>\</code> directly in front of it (i.e. <code>\_</code>); the same holds for a literal backslash (i.e. <code>\\</code>). To get a literal vertical bar <code>|</code>, use <code>{{tl|!}}</code> or <code>&#124;</code>. {| class="wikitable" |- ! Named flag ! Default value ! Default condition ! Description |- ! rowspan="6" style="text-align:right;" | <code>format=</code> | <code>%p[%s][%r]</code> | if the <code>property</code>/<code>properties</code> command '''was''' given and the <code>qualifier</code>/<code>qualifiers</code> command '''was not''' given | rowspan="6" | The format of a single claim. The available parameters are as follows. {| class="wikitable" |- ! Parameter ! Description |- | <code>%p</code> | The claim's property value applied by the <code>property</code>/<code>properties</code> command. |- | <code>%q1</code>, <code>%q2</code>, <code>%q3</code>, ... | The claim's qualifier value or list of qualifier values applied by the corresponding <code>qualifier</code>/<code>qualifiers</code> command. |- | <code>%q</code> | The collection of the qualifier values applied by each <code>qualifier</code>/<code>qualifiers</code> command (i.e. <code>%q1</code> + <code>%q2</code> + <code>%q3</code> + ...). If only one <code>qualifier</code>/<code>qualifiers</code> command was given, then this parameter is equivalent to <code>%q1</code>. |- | <code>%r</code> | The claim's reference value or list of reference values applied by the <code>reference</code>/<code>references</code> command. |- | <code>%a</code> | The entity's alias applied by the <code>alias</code>/<code>aliases</code> command. |- | <code>%b</code> | The entity's page badge applied by the <code>badge</code>/<code>badges</code> command. |- | <code>%s</code> | The movable separator placeholder. This is a special parameter that is not applied by a command, but instead is filled automatically between each pair of claims, aliases or badges (if a list of claims, aliases or badges is returned). This is particularly handy in case a claim's reference is returned as well, since it allows the reference to be placed after the punctuation mark as prescribed by [[Wikipedia:Manual of Style#Punctuation and footnotes|Wikipedia's manual of style]]. The default value is a comma (<code>,</code>) and can be overridden with the <code>sep%s</code> flag (see below). |} Optional parameters can be given by encapsulating them between square brackets: <code>[...]</code>. All content between the square brackets is only displayed if a value for each optional parameter that has been defined between the same brackets has been found. Optional content can also be nested. To use two opening square brackets that directly follow each other (i.e. <code>{{!((}}</code>), use <code>{{tl|!((}}</code>. At least one parameter must be given that is not optional, while the <code>%s</code> parameter must always be defined as optional. To get a literal <code>[</code>, <code>]</code>, <code>%</code> or <code>\</code>, escape the character by placing a backslash <code>\</code> directly in front of it (e.g. <code>\%</code>). See also the description directly above this table for more. |- | <code>%q[%s][%r]</code> | if the <code>property</code>/<code>properties</code> command '''was not''' given and the <code>qualifier</code>/<code>qualifiers</code> command '''was''' given |- | <code>%r</code> | if '''only''' the <code>reference</code>/<code>references</code> command was given |- | <code><nowiki>%p[ <span style="font-size:85\%">(%q)</span>][%s][%r]</nowiki></code> | if the <code>property</code>/<code>properties</code> command '''was''' given and the <code>qualifier</code>/<code>qualifiers</code> command '''was''' given |- | <code>%a[%s]</code> | if the <code>alias</code>/<code>aliases</code> command was given |- | <code>%b[%s]</code> | if the <code>badge</code>/<code>badges</code> command was given |- | colspan="4" | |- ! rowspan="2" style="text-align:right;" | <code>sep=</code> | <code>{{dfn|_|title=space}}</code> | <span style="color:#777;">''default''</span> | rowspan="2" | The fixed separator between each pair of claims, aliases or badges. |- | {{dfn|<code>{{0| }}</code>|title=empty}} | if '''only''' the <code>reference</code>/<code>references</code> command was given '''without''' the <code>raw</code> flag |- | colspan="4" | |- ! rowspan="2" style="text-align:right;" | <code>sep%s=</code> | <code>,</code> | <span style="color:#777;">''default''</span> | rowspan="2" | The movable separator between each pair of claims, aliases or badges. This will be the value of the <code>%s</code> parameter applied to all claims, aliases or badges, except for the last in the list (which can be set with the <code>punc</code> flag). |- | <code>;</code> | if the <code>property</code>/<code>properties</code> command '''was not''' given and the <code>qualifier</code>/<code>qualifiers</code> command '''was''' given |- | colspan="4" | |- ! style="text-align:right;" | <code>sep%q1=</code>, <code>sep%q2=</code>, <code>sep%q3=</code>, ... | <code>{{dfn|,_|title=comma space}}</code> | <span style="color:#777;">''default''</span> | The separator between each pair of qualifiers of a single claim. These are the value separators for the <code>%q1</code>, <code>%q2</code>, <code>%q3</code>, ... parameters. If only one <code>qualifier</code>/<code>qualifiers</code> command was given, then the <code>sep%q1</code> flag is equivalent to <code>sep%q</code>. |- | colspan="4" | |- ! rowspan="2" style="text-align:right;" | <code>sep%q=</code> | <code>{{dfn|,_|title=comma space}}</code> | if '''exactly one''' <code>qualifier</code>/<code>qualifiers</code> command was given | rowspan="2" | The separator between each set of qualifiers of a single claim. This is the value separator for the <code>%q</code> parameter. If only one <code>qualifier</code>/<code>qualifiers</code> command was given, then this flag is equivalent to <code>sep%q1</code>. |- | <code>{{dfn|{{;}}_|title=semicolon space}}</code> | if '''more than one''' <code>qualifier</code>/<code>qualifiers</code> command was given |- | colspan="4" | |- ! rowspan="2" style="text-align:right;" | <code>sep%r=</code> | {{dfn|<code>{{0| }}</code>|title=empty}} | <span style="color:#777;">''default''</span> | rowspan="2" | The separator between each pair of references of a single claim. This is the value separator for the <code>%r</code> parameter. |- | <code>{{dfn|_|title=space}}</code> | if the <code>raw</code> flag '''was''' given for the <code>reference</code>/<code>references</code> command |- | colspan="4" | |- ! style="text-align:right;" | <code>punc=</code> | {{dfn|<code>{{0| }}</code>|title=empty}} | <span style="color:#777;">''default''</span> | A punctuation mark placed at the end of the output. This will be placed on the <code>%s</code> parameter applied to the last claim (or alias or badge) in the list. This allows the last claim's references to be placed after the punctuation mark when the output is used as part of a sentence. |}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon