Moritz Blum
Moritz Blum

Reputation: 103

Semantic Media Wiki Categories for Templates

We are running MediaWiki 1.34.2 with SMW 3.2.0 and want to query (ask) for all templates of a certain Category. The category is shown on the template page and the template is shown on the category page. But when using Special Page Browse wiki, the category is not shown. When printing the response of the query, the list is not complete and no template has a category. We added the required namespaces and tried to rebuild the wiki.

Template:

<noinclude>
[[Category:Test]]
<pre>
{{Device
|Name=
}}
</pre>
</noinclude>
<includeonly>
{| class="wikitable"
! Name
| {{{Name|}}}
|}
[[Category:TestInt]]
</includeonly>

Ask:

{{#ask:
[[Template:+]] | ?Category
}} 

Upvotes: 0

Views: 201

Answers (1)

FO-nTTaX
FO-nTTaX

Reputation: 611

To ask for templates in a certain category, you need to ask for the category like

{{#ask:
[[Template:+]][[Category:Some Category Name]]
}} 

See also https://www.semantic-mediawiki.org/wiki/Help:Inline_queries

Upvotes: 1

Related Questions