Template:Identification resources for geography
Appearance
Template documentation
This template is a wrapper around a Cargo query designed for displaying structured information from the `Resource` table in a dynamic and styled format.
It is intended for use on pages that list or filter species identification resources by geography or other keywords.
Usage
{{TemplateName
|cargo_table=Resource
|cargo_fields=Name, Year_published, Resource_link, Language, Specific_geography, Author
|cargo_display_fields=Name, Year_published, Resource_link, Language, Author
|cargo_where=Specific_geography HOLDS "{{#if:{{{filter_value|}}}|{{{filter_value}}}|{{PAGENAME}}}}" AND Descriptive_keyword HOLDS "Species Identification"
|options={"link_text":"View"}
}}
Parameters
cargo_table- The name of the Cargo table being queried. In this case, it should be
Resource. cargo_fields- The full set of fields to query from the Cargo table. These are used in the SQL-level query and should include any fields you plan to display or filter on.
cargo_display_fields- The subset (or reordered set) of fields from
cargo_fieldsthat should be shown in the table output. Can also include custom labels or expressions. cargo_where- A conditional filter used to limit which rows are returned. Commonly includes
Identification resources for geographyor passed-in parameters. options- Optional JSON-style string providing advanced display behavior. The most common usage is:
"link_text"— Replaces the display of any field typed asURLwith a user-friendly clickable label (e.g.,"View")."link_text_fields"— An optional array of specific field names to applylink_textto (e.g.,["Resource_link", "Attribution_link"]).
Example
The following example will display a table of resources related to the current page’s geography and the keyword “Species Identification”. If any URLs are present (e.g., in Resource_link), they will be shown as a clickable label: View.
{{TemplateName
|cargo_table=Resource
|cargo_fields=Name, Year_published, Resource_link, Language, Author
|cargo_display_fields=Name, Year_published, Resource_link, Language, Author
|cargo_where=Specific_geography HOLDS "{{PAGENAME}}" AND Descriptive_keyword HOLDS "Species Identification"
|options={"link_text":"View"}
}}
Notes
- This template is built on a shared Cargo query wrapper used across the wiki. For performance and consistency, please avoid altering its core logic.
- If you need to display raw URLs, simply omit the
optionsparameter. - For field-specific customization, use
link_text_fieldsin addition tolink_text.