User:Flashjay/templates/Template:D: Difference between revisions
(Created page with "<noinclude> This template extracts the content ("data") from an field in an infobox, on the same or on another page. It only works with infoboxes that have been data-enabled,...") |
No edit summary |
||
Line 2: | Line 2: | ||
This template extracts the content ("data") from an field in an infobox, on the same or on another page. | This template extracts the content ("data") from an field in an infobox, on the same or on another page. | ||
It only works with infoboxes that have been data-enabled, such as [[User:Flashjay/templates/ | It only works with infoboxes that have been data-enabled, such as [[User:Flashjay/templates/Tool Infobox]]. | ||
Typically this is used within other templates to automatically populate information. It is especially useful when used within a <nowiki>{{#foreach:}}</nowiki> construct, to iterate through a list of pages and produce a table or other type of richly formatted list, directly from the data supplied by the infoboxes. | Typically this is used within other templates to automatically populate information. It is especially useful when used within a <nowiki>{{#foreach:}}</nowiki> construct, to iterate through a list of pages and produce a table or other type of richly formatted list, directly from the data supplied by the infoboxes. |
Latest revision as of 15:44, 1 January 2020
This template extracts the content ("data") from an field in an infobox, on the same or on another page.
It only works with infoboxes that have been data-enabled, such as User:Flashjay/templates/Tool Infobox.
Typically this is used within other templates to automatically populate information. It is especially useful when used within a {{#foreach:}} construct, to iterate through a list of pages and produce a table or other type of richly formatted list, directly from the data supplied by the infoboxes.
Use
The template has the following two methods of use.
{{d|Field}} {{d|Page|Field}}
The first variant extracts a value from the current page (note that when previewing a page, it will extract the value from the most recently saved copy.)
The second variant extracts a field from another page entirely.
Category:Infoboxes