Difference between revisions of "Template:Examples"

From Wikispooks
Jump to navigation Jump to search
(test)
({{FULLPAGENAME}} is superior to {{PAGENAME}})
 
(52 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>'''This template can be used on ''any'' pages which might have example documents.''' It has no parameters.
+
<noinclude>{{TemplateProblem|This is not displaying any results for [[Journalist]]. It should do.}}
 +
'''This template can be used on any pages which might have examples.''' It has no parameters.
  
If there are any example documents, it places a heading:<br/>
+
If there are examples, it places a heading:<br/>
==Example(s) on WikiSpooks==
+
==Example(s) on Wikispooks==
Plus a table of examples under this heading
+
Plus a table of examples under this heading[[Category:Semantic Templates]]
 
+
</noinclude><!-- The below test is to prevent re-displaying of data which will be displayed by {{JobHolders}}...
[[Category:Semantic Templates]]
+
--><includeonly>{{#ifexpr: {{#ask: [[Has jobTitle::{{FULLPAGENAME}}]]|format=count}}=0|{{SMWDocSection
</noinclude><includeonly>{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>0|
+
|expression= [[Constitutes::{{FULLPAGENAME}}]] OR [[Has posting::{{FULLPAGENAME}}]]
== Example{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|s|&nbsp;{{PAGENAME}}}} on WikiSpooks==
+
|caption_singular=An example
{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|<small>''Use the Up/Dn symbols to sort''</small>|}}
+
|caption_plural=Examples
 
+
|limit=200
<!-- Key properties specified, so use them to display the document table -->
+
|mainlabel = Page&nbsp;name
{{ask
+
|sort={{#show: {{FULLPAGENAME}} | ?Has keySort}}
|expr= [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
+
|properties={{#if: {{#show: {{FULLPAGENAME}} | ?Has keyProperties}}|{{#show: {{FULLPAGENAME}} | ?Has keyProperties}}|Description}}
|mainlabel=Example
+
|headers={{#if: {{#show: {{FULLPAGENAME}} | ?Has keyProperties}}|{{#show: {{FULLPAGENAME}} | ?Has keyPropertyHeaders}}|Description}}}}}}</includeonly>
|format=table
 
|properties=Started/ON has cause/Has cause/Description
 
|headers=Date/Attributed to/Perpetrator(s)/Description
 
}}
 
<!--
 
{{#arraymaptemplate:{{#show: {{PAGENAME}}|?Has key properties}}|AskItem|, |\n}}
 
 
 
->>
 
|
 
<!-- No key properties known, so use the default set for documents -->{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
 
|mainlabel=Document name
 
|?Is about=Subject(s)
 
|?Has author=Author(s)
 
|?Has publication date=Publication date
 
|format=table
 
}}
 
}} }}</includeonly>
 

Latest revision as of 18:50, 3 February 2020

Bug1.jpg This template has problems: This is not displaying any results for Journalist. It should do. Use the discussion page to see the debate about this.

This template can be used on any pages which might have examples. It has no parameters.

If there are examples, it places a heading:

Example(s) on Wikispooks

Plus a table of examples under this heading