ਫਰਮਾ:Item
This template packs structured data into a compact item, which can be passed as a parameter to another template. This allows to pass multiple structured items to that template, which can iterate over the items and extract data from them. UsageThe structured data item contains all parameters (both numbered ones and named ones) passed to the {{Item}} template. For example, Multiple items will be passed to an example recipient template {{User:Petr Matas/sandbox/Pets}} like this:
Constructs available to recipient templatesGet a component of an itemSee Template:Component. Format an item using a templateSee Template:Format item. Format each item using a templateIn the recipient template, use: {{#invoke:Item|each|template=TransformationTemplate|Separator|Prefix|Suffix|...}} This transforms all items using a given template. The template {{User:Petr Matas/sandbox/Pets}} from the example produces the list of pets using the following code (note the use of newline as a {{#invoke:Item|each|template=Show pet| |*}} Gather given parameter from all itemsIn the recipient template, use The template {{User:Petr Matas/sandbox/Pets}} from the example produces the total number of legs using See also
|
Portal di Ensiklopedia Dunia