Template:Identification resources for species

From HopperWiki
Jump to navigation Jump to search

This template was created as a wrapper function for making Cargo queries of HopperWiki's databases. As you can see, the name of the template follows the pattern <X> <Y> for <Z> where the "Y" (i.e. single word before the word "for") refers to a Cargo table that is being queried (e.g. Resource) and "Z" refers to the field that is used in conjunction with the user-provided string passed to the parameter filter_value which is usually the main focus of the page that the template is used on (e.g. a focal species or organization). Additionally, "X" is a descriptive string of one or more words that refers to a further filtering that will take place (that the user has no control over) in that same Cargo table (e.g. filtering by "Resources" of Category "Media" or filtering by "Organizations" of focus "Management").The result will be a formatted table that will be displayed on the wiki page that calls the template.

Example usage with single value

{{Identification resources for species|filter_value=add the single value you want to use to filter field "Z"}}

Simpler shortcut usage

A simpler form of using this template is available if the template is being used on a wiki page whose title is the value you want to filter by (e.g. filtering organizations for Schistocerca gregaria on the Schistocerca gregaria page). In this simpler case, no argument needs to be passed to `filter_value`. The template will obtain this value from the title of the page that it is being used on (i.e. called from) and the function can be used as such:
{{Identification resources for species}}