Template:Ask

This template was once used to query for everything related to certain pages, the rationale being that queries that do not apply would not return results and not affect the page. However, even non-applicable queries need to be computed, and the resulting unnecessary performance impact is the reason why this template now is strongly deprecated.

Please remove this template whenever it occurs on some page.

Query templates still are a good idea, but they should be topic-specific. Examples are the templates Template:Institution data and Template:Event series. Often, such topic specific templates may also be combined with suitable annotations (e.g. categories for that topic). Standard queries and links: |:Category:+||Relation:+||Attribute:+||Template:+part of::part of::* |:Category:+||Relation:+||Attribute:+||Template:+has part::has part::* |:Category:+||Relation:+||Attribute:+||Template:+subevent of::event |:Category:+||Relation:+||Attribute:+||Template:+subtopic of::topic |:Category:+||Relation:+||Attribute:+||Template:+extends::extends::*operational on::* |:Category:+||Relation:+||Attribute:+||Template:+operational on::operational on::* |:Category:+||Relation:+||Attribute:+||Template:+event in series:: From To City Country |:Category:+||Relation:+||Attribute:+||Template:+has location city::has location city::*has location country::*  |:Category:+||Relation:+||Attribute:+||Template:+has location state::has location city::*has location state::*has location country::*  |:Category:+||Relation:+||Attribute:+||Template:+has location country::has location city::*has location country::* |:Category:+||Relation:+||Attribute:+||Template:+in street::in street::*street number:=*instance of::*capital of::capital of::* |:Category:+||Relation:+||Attribute:+||Template:+has capital::has capital::* |:Category:+||Relation:+||Attribute:+||Template:+borders::borders::* |:Category:+||Relation:+||Attribute:+||Template:+member of::member of::* |:Category:+||Relation:+||Attribute:+||Template:+has member::has member::* |:Category:+||Relation:+||Attribute:+||Template:+instance of::instance of::* |:Category:+||Relation:+||Attribute:+||Template:+has category::has category::* |:Category:+||Relation:+||Attribute:+||Template:+category about::about |:Category:+||Relation:+||Attribute:+||Template:+uses currency::uses currency::* <ask link=all mainlabel=country>|:Category:+||Relation:+||Attribute:+||Template:+uses currency:: instance of:: uses currency::*  |:Category:+||Relation:+||Attribute:+||Template:+presented at::presented at::*  |:Category:+||Relation:+||Attribute:+||Template:+accepted by::accepted by::*  |:Category:+||Relation:+||Attribute:+||Template:+coded in::coded in::*  |:Category:+||Relation:+||Attribute:+||Template:+made of::made of::*  |:Category:+||Relation:+||Attribute:+||Template:+inverse::inverse::*  |:Category:+||Relation:+||Attribute:+||Template:+related::related::*  |:Category:+||Relation:+||Attribute:+||Template:+about::about::*  |:Category:+||Relation:+||Attribute:+||Template:+has attribute::has attribute::*  |:Category:+||Relation:+||Attribute:+||Template:+similar::similar::* <ask link=all mainlabel=relation>|:Category:+||Relation:+||Attribute:+||Template:+relation equal to attribute::equal attribute {{ #switch: {{NAMESPACE}} | Category =

Factbox
}}

This template is called from many pages of all kinds and executes many queries to find various info related to the page, including info related to an attribute value equal to the pagename. For server efficiency it is being replaced by templates specific to a page category; they also add the category tag, see Relation:Category added by template; from each of these templates queries which cannot be applicable to pages in that category have been removed.

See its discussion page for criticism of this approach.

This template requires the ParserFunctions extension.

To substitute the template, use <tt> </tt>.

If the page concerned is a relation, attribute or category page it generates a table of all instances of this property, unless the template is called with parameter "list=no". The latter is useful if an adapted version of the table is made separately, to avoid duplication.

In general it shows various directly and indirectly related pages and values. For this purpose the template contains many queries regarding specific relations and attributes.

In the case of an attribute of other than string type, a pagename which is not a valid value would produce all instances of the attribute concerned. Therefore such attributes have not been used in selection parts of the queries.

Use is made of the fact that if the set of pages selected in a query is empty, no header row or blank line, not even any blank space, is produced, so that queries which are not applicable do not clutter the output.

Some query results have CSS class "indirectlyrelevant". They are hidden by default but can be seen with the CSS code:

.indirectlyrelevant {display: block !important }

The template provides links for searching the Web, and searching all Wikipedias. Parameter st is the search phrase, with as default the pagename (with spaces, not underscores). This part has CSS class "searchlinks". It is also hidden by default, but enabled with the CSS code:

.searchlinks {display: block !important }