Template:From Bildindex

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:From Bildindex/doc.

Multilingual template for source indications of images from Bildindex, especially for use in “source=” field of templates {{Artwork}} or {{Information}}. For references use template {{Bildindex}}!

The template automatically sets the following categories: Images from Bildindex der Kunst und Architektur

Usage

{{From Bildindex |object= |fname= |noext= }}

See also information in description of category Images from Bildindex der Kunst und Architektur.

Example 1

Simple use – sufficient for single-piece objects:

{{From Bildindex |object=00000001 |fname=fm192356}}

Bildindex der Kunst und Architektur: object 00000001 – image file fm192356a.jpg

Note, that in the image link the resulting JPEG file has after fname an additional trailing a before the file extension.

For some cases, when there is only a file existing without extension you can enter the parameter noext with value yes. This should be tested in edit preview. (In fact, this works for all files, as far as known.)

{{From Bildindex |object=00000001 |fname=fm192356 |noext=yes}}

Bildindex der Kunst und Architektur: object 00000001 – image file fm192356 (JPEG file without extension)

Example 2: Incorrect uses

object and fname are required parameters:

Missing parameter object
{{From Bildindex |fname=fm192356}}

Bildindex der Kunst und Architektur: Error: Missing required parameter object! – image file fm192356a.jpg


Missing parameter fname
{{From Bildindex |object=00000001}}

Bildindex der Kunst und Architektur: object 00000001 Error: Missing required parameter fname!


Parameter without name

Probably confusion with template {{Bildindex}}.

{{From Bildindex|00000001}}

Bildindex der Kunst und Architektur: Error: Missing required parameter object! Error: Missing required parameter fname!


Parameter noext with wrong or without value

You will not notice any error in Wikimedia Commons, but depending on the object it may be, that a useless or invalid link is created.

{{From Bildindex |object=05010720 |fname=rba_c001524 |noext=on}}

Bildindex der Kunst und Architektur: object 05010720 – image file rba_c001524a.jpg

{{From Bildindex |object=05028686 |fname=rba_c001203 |noext}}

Bildindex der Kunst und Architektur: object 05028686 – image file rba_c001203a.jpg

Template parameters

ParameterDescriptionDefaultStatus
objectObject number, found after “obj” in web address or on description page both in “Bildlink” and “Link zu dieser Seite”. Do not confuse with “Objekt-PID”!emptyrequired
fnameThe file name like it is displayed on description page after “Bilddatei-Nr.” or in “Bildlink” after ?medium=.emptyrequired
noextFor some cases, when there is only a file version existing without extension (must be tested in edit preview!). You must enter the parameter with value “yes”, namely exactly this way in small cases: noext=yes.emptyoptional
phnrFormerly used for a photograph number, but this is not supported anymore at Bildindex. Parameter is still kept as long as it is in use, but has no effect.emptydeprecated
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Multilingual template for source indications of images from Bildindex, especially for use in “source=” field of templates {{Artwork}} or {{Information}}. For references use template {{Bildindex}}!

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
fname

The file name like it is displayed on description page after “Bilddatei-Nr.” or in “Bildlink” after “?medium=”.

Linerequired
noext

For some cases, when there is only a file version existing without extension (must be tested in edit preview!). You must enter the parameter with value “yes”, exactly this way in small cases.

Lineoptional
object

Object number, found after “obj” in web address or on description page both in “Bildlink” and “Link zu dieser Seite”. Do not confuse with “Objekt-PID”!

Numberrequired
phnr

Formerly used for a photograph number, but this is not supported anymore at Bildindex. Parameter is still kept as long as it is in use, but has no effect.

Linedeprecated

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)