Difference between revisions of "Template:Examples"

From Wikispooks
Jump to navigation Jump to search
m (test)
(test)
Line 9: Line 9:
 
== Example{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|s| {{PAGENAME}}}} on WikiSpooks==
 
== Example{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|s| {{PAGENAME}}}} on WikiSpooks==
 
{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|<small>''Use the Up/Dn symbols to sort''</small>|}}
 
{{#ifexpr:{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]|format=count}}>1|<small>''Use the Up/Dn symbols to sort''</small>|}}
{{#ifexpr:{{#ask: [[-Has key properties::{{PAGENAME}}]]|format=count}}>0|A|B}}
 
 
<!--
 
 
{{#ifexpr:{{#ask: [[-Has key properties::{{PAGENAME}}]]|format=count}}>0|
 
{{#ifexpr:{{#ask: [[-Has key properties::{{PAGENAME}}]]|format=count}}>0|
 
+
<!-- Key properties specified, so use them to display the document table -->
 
{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
 
{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
|mainlabel=Document name
+
|mainlabel=Example
|?Has publication date=Publication date
+
{{#arraymaptemplate:{{#ask: [[-Has key properties::{{PAGENAME}}]]}}|AskItem|,|\n}}
|format=table
 
 
}}
 
}}
  
 
|
 
|
-->
+
<!-- No key properties known, so use the default set for documents -->{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
{{#ask: [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
 
 
|mainlabel=Document name
 
|mainlabel=Document name
 
|?Is about=Subject(s)
 
|?Is about=Subject(s)

Revision as of 13:56, 31 December 2013

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

If there are any example documents, it places a heading:

Example(s) on WikiSpooks

Plus a table of examples under this heading