Jump to content

Template:Wn/si/තොරතුරු පැනලය වගුව/උපදෙස්

From Wikimedia Incubator

භාවිතය

[edit source]

This template generates a wikitable of data for customizing the infobox for a give category, as generated by template {{Wn/si/තොරතුරු පැනලය}}. The customizing table for a category Foobar should be placed in a page called Template:Wn/si/Infobox/lookup/Foobar.

Format the call to this template like this:

{{Wn/si/Infobox table|
|image=Example.svg
|image heading=An example image.  {{Wn/si/Image|[[Commons:User:Nethac DIU|Nethac DIU]]}}
}}

specifying whichever of the customizing parameters you want (in this example, image and image heading). Following is a list of the recognized customizing parameters, as of this writing, with their meanings and default values. Caveat: these default values apply to fields not specified by a table; not to be confused with the behavior of {{Wn/si/තොරතුරු පැනලය}} when there is no table specific to the category of the infobox.

parameter default what it does
label If non-blank, the label on the category link at the top of the infobox.
list heading Related articles Appears just above the list of recently published articles in the category.
list dates If non-blank, publication dates are listed for the listed articles.
list length 5 How many articles to list.
image heading If non-blank, this heading is placed just above the main image.
image If not=blank, the main image.
image size available width The width for display of the main image. Available width is 200px if unpadded, 196px if padded (irregular or with heading).
image caption The caption for the image, visible as a mouseover.
image irregular If non-blank, the image is non-rectangular, so a little extra space should be left around it to avoid odd appearance.
image padding If non-blank, the specified amount of extra space is left around the image; supersedes image irregular.
image at top If non-blank, the main image is placed above the article list rather than below. Leave this blank if there is no main image.
bottom image If non-blank, an image to display at the very bottom of the infobox.
bottom image size 60px The width for display of the bottom image.
image n
  for 2≤n≤12
If non-blank, an alternative main image; selected by rotation via {{Wn/si/තොරතුරු පැනලය/select}}.

Ordinarily, the page that calls {{Wn/si/තොරතුරු පැනලය වගුව}} is automatically added to Category:Wn/si/තොරතුරු පැනලය වගු. Passing a non-blank value to template parameter nocat suppressed this categorization.

Internals

[edit source]

This template generates a wikitable, which is parsed by {{Wn/si/තොරතුරු පැනලය}}; but {{Wn/si/තොරතුරු පැනලය}} does not itself interpret the parameters or even validate them, it just passes whatever it finds to {{Wn/si/තොරතුරු පැනලය/p1}}, as an S-exression. {{Wn/si/තොරතුරු පැනලය/p1}} validates the parameters and passes them as template parameters to {{Wn/si/තොරතුරු පැනලය/p2}}, which is responsible for using them to build the infobox. If it becomes needful to add to or otherwise change the set of valid parameters, the following templates are the ones that need to be modified: {{Wn/si/තොරතුරු පැනලය වගුව}} (and its documentation, above); {{Wn/si/තොරතුරු පැනලය/p1}}; {{Wn/si/තොරතුරු පැනලය/p2}}; and, if the number of selectable images changes, {{Wn/si/තොරතුරු පැනලය/select}}.

මේවාත් බලන්න

[edit source]