វិគីភីឌា:Manual of Style (ប្រអប់ព័ត៌មាន)
An infobox template is an infobox that uses the template software feature. They are a broad class of templates commonly used in articles to present certain summary or overview information about the subject. These boxes are designed to be placed into main articles related to the topic area, and are usually associated with on-going WikiProjects. They have parameters; to work properly, the parameter values have to be specified when the template is inserted in the page. This allows each infobox to show information relevant to the article subject, while requiring only a minimal amount of coding within each article. Design principlesPurpose of an infoboxWhen considering any aspect of infobox design, keep in mind the purpose of an infobox: to summarize key facts about the article in which it appears. The less information it contains, the more effectively it serves that purpose, allowing readers to identify key facts at a glance. Of necessity, some infoboxes contain more than just a few fields; however, wherever possible, present information in short form, and exclude any unnecessary content. Do not include links to sections within the article; the table of contents provides that function. Overall approachThe recommended process for creating an infobox template is to simply begin, and gather as many requirements as possible. Test the base format for a new template as a static table first, then once consensus is reached, migrate it into template format. The template should be reviewed before being used extensively in articles in case the template or defined parameters need modification to minimize re-works. If new fields and parameters are added, articles must be updated to reflect the new requirements. If parameters are renamed or removed, many articles will likely be unaffected, since extraneous parameters are ignored. Consistency between infoboxesFor consistency the following guidelines apply:
When creating a new infobox template the content of {{Infobox}} is a convenient starting point. Parameters in infoboxes should be named, not numbered, to provide for future use. A parameter value can contain images (i.e. full image tags), or parameters for parts of an image tag such as the image name, size and caption. If a parameter is not applicable, or no information is available, it should still be assigned a value. This can be the empty string, or if it is the only thing in a table cell use " There are alternative ways to make a template selectively hide information or provide default values if not defined. For an example and explanation of how these methods apply to infoboxes, see {{Infobox}}. General considerationsThe availability of optional fields does not mean that all fields should be made optional, nor that large numbers of rarely used fields should be added without regard for the layout and ease-of-use of the infobox template. In some cases, the markup for the field still needs to be downloaded even if it is not displayed. Creating overly long templates with a number of irrelevant fields is not recommended. As you design an infobox template, consider the following questions:
Geographical infoboxesInfoboxes for geographical items should generally be headed with the article title, although the formal version of a name (e.g. Republic of Montenegro at Montenegro) can be substituted. Alternate or native names can appear beneath this. Extensive historic names are often better in a second infobox, as at Augsburg. Causes of inconsistencyA number of factors can cause inconsistency in available summary information for a particular type of article:
Dynamic templatesIn theory, the fields in an infobox should be consistent across every article using it; in practice, however, this is rarely the case, for a number of reasons. Infobox templates should be designed to dynamically adapt themselves to the absence or presence of particular fields. Like static infoboxes, they are designed to present summary information about an article's subject, such that similar subjects have a uniform look and in a common format. However, the template technique allows updates of style and of common text from a central place, the template page. While there are several alternatives to dynamic infoboxes, such as using multiple (forked) templates or leaving fields blank, they should be avoided, for a number of reasons:
ImplementationsConditional templatesSpecial "templates" that selectively show or hide particular content (such as table rows) within an infobox based on the value of one or more template parameters. {{#if:{{{party|}}}|<tr><th>Political party</th><td>{{{party|}}}</td></tr>|}} Name-resolved meta-templatesSeveral sub-templates (or even independent templates) with a common name prefix. They are included in an infobox based on the value of a particular parameter, which acts as the name suffix. For example, we create Multi-part infoboxesRather than having each field correspond to a parameter on one template, the infobox consists of an individual sub-template for each field; see, for example, Template:Taxobox. Interaction between multiple templatesTemplates can be designed in a modular way, such that various combinations are possible. A combination may even appear on the page as a single infobox. For example, if the WikiProject Saints group wanted to design a template based on their static Infobox, they could use Template:Infobox Biography, and design a project-specific template with only additional information, and the pages would render both "stacked" together. List of templates
See alsoOther types of templates:
|
Portal di Ensiklopedia Dunia