Difference between revisions of "Template:Examples"

From Wikispooks
Jump to navigation Jump to search
(Upgrade to use SMWDocSection)
(Better default for when keyProperties is not set)
(39 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::{{PAGENAME}}]]|format=count}}=0|{{SMWDocSection
</noinclude><includeonly>
+
|expression= [[Constitutes::{{PAGENAME}}]] OR [[Has posting::{{PAGENAME}}]]
{{SMWDocSection
+
|caption_singular=An example
|expression= [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
+
|caption_plural=Examples
|captionSingular=An example on WikiSpooks
+
|limit=200
|captionPlural=Examples on WikiSpooks
+
|mainlabel = Page&nbsp;name
|mainlabel = Wikispooks page
+
|sort={{#show: {{PAGENAME}} | ?Has keySort}}
|properties={{#if: {{#show: [[-Has key properties::{{PAGENAME}}]]}}|{{#show: {{PAGENAME}} | ?Has key properties}}|DocType/Has publication date/Is about/Description}}
+
|properties={{#if: {{#show: {{PAGENAME}} | ?Has keyProperties}}|{{#show: {{PAGENAME}} | ?Has keyProperties}}|Description}}
|headers={{#if: {{#show: [[-Has key properties::{{PAGENAME}}]]}}|{{#show: {{PAGENAME}} | ?Has key property headers}}|Document type/Publication date/Subject(s)/Description}}
+
|headers={{#if: {{#show: {{PAGENAME}} | ?Has keyProperties}}|{{#show: {{PAGENAME}} | ?Has keyPropertyHeaders}}|Description}}}}}}</includeonly>
}}</includeonly>
 

Revision as of 01:23, 31 March 2019

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