User:Flashjay/templates/Template:D

From GCD
< User:Flashjay
Revision as of 19:00, 27 December 2019 by Flashjay (talk | contribs) (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,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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/Template:Data-E 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