(Created page with "To get a better overview of all templates in the wiki, you can catalog the templates using semantic attributes. ==Steps== #'''Activate''' the feature ''Semantic MediaWiki''...") |
No edit summary Tag: 2017 source edit |
||
Line 3: | Line 3: | ||
==Steps== | ==Steps== | ||
#'''Activate''' the feature ''Semantic MediaWiki'' for the namespace "Template" in the [[Manual:Extension/BlueSpiceNamespaceManager|namespace manager]]. [[ | #'''Activate''' the feature ''Semantic MediaWiki'' for the namespace "Template" in the [[Manual:Extension/BlueSpiceNamespaceManager|namespace manager]]. [[File:Manual:1652434929387.png|alt=Namespace manager|center|thumb|450x450px|Namespace manager]] | ||
#'''Create''' the page ''Property:Is_templateType''. '''Add''' the following content and '''save''' the page:<syntaxhighlight lang="text"> | #'''Create''' the page ''Property:Is_templateType''. '''Add''' the following content and '''save''' the page:<syntaxhighlight lang="text"> | ||
This is a property of type [[Has type::Text]]. | This is a property of type [[Has type::Text]]. | ||
</syntaxhighlight> | </syntaxhighlight>[[File:Manual:1652435035799.png|alt=Create a property|center|thumb|750x750px|Create a property]] | ||
#'''Add''' the attribute with a value in source editing mode to your templates, wrapped in a <code><nowiki><noinclude></noinclude></nowiki></code> tag . The <code><nowiki><noinclude>...</noinclude></nowiki></code> tag is required so that pages that include this template, are not | #'''Add''' the attribute with a value in source editing mode to your templates, wrapped in a <code><nowiki><noinclude></noinclude></nowiki></code> tag . The <code><nowiki><noinclude>...</noinclude></nowiki></code> tag is required so that pages that include this template, are not cataloged as well:<syntaxhighlight lang="text"><noinclude>'''Property type''': [[is_templateType::General]]</noinclude> | ||
</syntaxhighlight>[[ | </syntaxhighlight>[[File:Manual:property page.png|alt=add property to a template page|center|thumb|750x750px|add property to a template page]] | ||
#''' | #'''Add''' the following SMW-query on any wiki page to create an overview that shows your cataloged templates:<syntaxhighlight lang="text"> | ||
{{#ask: [[is_templateType::+]] | {{#ask: [[is_templateType::+]] | ||
|?ist_Templatetype=Template type | |?ist_Templatetype=Template type | ||
Line 16: | Line 16: | ||
|class=datatable | |class=datatable | ||
}} | }} | ||
</syntaxhighlight>[[ | </syntaxhighlight>[[File:Manual:smw-query-templateslist.png|alt=List of templates in the wiki|center|thumb|750x750px|List of templates in the wiki]] | ||
[[Category:SMW]] | [[Category:SMW]] | ||
[ | [en:{{FULLPAGENAME}}]] | ||
[[ | [[de:Handbuch:SMW/Vorlagenübersicht]] |
Revision as of 10:50, 13 May 2022
To get a better overview of all templates in the wiki, you can catalog the templates using semantic attributes.
Steps
- Activate the feature Semantic MediaWiki for the namespace "Template" in the namespace manager.
- Create the page Property:Is_templateType. Add the following content and save the page:
This is a property of type [[Has type::Text]].
- Add the attribute with a value in source editing mode to your templates, wrapped in a
<noinclude></noinclude>
tag . The<noinclude>...</noinclude>
tag is required so that pages that include this template, are not cataloged as well:<noinclude>'''Property type''': [[is_templateType::General]]</noinclude>
- Add the following SMW-query on any wiki page to create an overview that shows your cataloged templates:
{{#ask: [[is_templateType::+]] |?ist_Templatetype=Template type |mainlabel=Template |format=table |class=datatable }}
[en:Manual:SMW/Templates overview page]]