

This of course requires a knowledge of the template's details. Using named values just means adding the name of the option and an equals sign before the option's value. The sequence of options is unimportant, since all options must be named in any case. At times, especially when the first character of a parameter is a symbol, the use of named or numbered parameters avoids the corruption that would otherwise result with the unnamed entry. Alternatively, the template can manage with unnamed and unnumbered parameter entries provided that they are in any case listed in their correct number sequence.

When templates have several parameters then the parameter numbers or names help to make clear to the template which is which. The template-call in the example uses a so-called unnamed parameter, because it is not preceded by a term like 1= (numbered parameter), or content= (typical named parameter). Parameters are given numbers or names to identify them in their design code, and examples will be seen in the sections that follow. The above code has only one parameter it is numbered 1 by default. This is the code to call the template for use It has two text parameters and no options at all. In the first example, the template Caption is used.

The remainder of this introduction gives a few examples to show what templates do on the page, and in the sections that follow will be found what is needed to modify and make new templates for use in writing Wikibooks. MORE GENERALLY, templates let us do much of the preparation in advance of making a page, and let us insert a block of typing, be it code to make tables, boxes, and other structures, or just a paragraph of text that is used a lot.The new paragraph would then appear in a new text box. A template can even be the parameter of another template for example, a template to insert a test paragraph might occupy the parameter space of a template to make a text box. Sometimes parameters contain text like code to insert an image, or even a gallery or a table it just depends what the template is designed for. For example, if a template makes text red, it still needs to know the text to color this text is called a parameter, and the text is included by the user when the template is called for use. PARAMETERS are usually bits of text that a user enters for a template to process.In the same way if the user forgets to type a text input, the template could use a pre-planned default input instead of the missing parameter sometimes just a code to say something was forgotten. For example, in the alignment example above, if the align option was not used, the template could use left, provided that left had been specified in design as its default. Default values are specified in design, and they could apply to formats or to user text inputs. DEFAULTS are the values used by a template when the user did not say.Templates do not always need options, since their default behavior is often enough. For example, option values for an option called align might include only left, right, or center, and no others. Option values are usually limited to a short list so these are described in a template's documentation. The usual behavior suits most situations but the designer builds-in ways of changing things just in case. OPTIONS allow the user to vary the template's usual behavior.Sometimes other text is also used along with the name it can include any options and parameters. The name must be unique, and it is used when a template is called for use. NAMES of templates are assigned when they are first saved.The main effort as you might suppose, lies in its initial design. This behavior can be repeated at any point that the user wants, and almost any work that is found on a wiki page could be placed within a template to do this.

In a simple case, by typing a template's name in the work, an entire block of text is added to the page with all of its formats and other parts, just as if it had been typed by the user. Some are ordinary text paragraphs and some contain wikitext to make headings, indents, tables, and the like.
