Difference between revisions of "Template:SourcedDocuments"

From Wikispooks
Jump to navigation Jump to search
(Revise for #matches)
(fix SMW)
 
(11 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
If there are any related documents, it places a heading:
 
If there are any related documents, it places a heading:
==Documents sourced from this page==
+
==Document(s) sourced from <nowiki>{{PAGENAME}}</nowiki>==
Plus a table of related documents under this heading
+
Plus a table of sourced document(s) under this heading
[[Category:Page Templates]]
+
[[Category:Semantic Templates]]
</noinclude><includeonly>{{#ifexpr:{{#ask: [[Sourced from::{{PAGENAME}}]]|format=count}}>0|
+
</noinclude><includeonly>{{SMWDocSection
==Document{{#ifexpr:{{#ask: [[Sourced from::{{PAGENAME}}]]|format=count}}>1||s}} sourced from {{PAGENAME}}==
+
|expression= [[Has objectClass::Document]][[Sourced from::{{PAGENAME}}]]
{{#ifexpr:{{#ask: [[Is about::{{PAGENAME}}]]|format=count}}>1|<small>''Use the Up/Dn symbols to sort''</small>|}}{{#ask: [[Sourced from::{{PAGENAME}}]]
+
|caption_singular=A document sourced from {{PAGENAME}}
{{#ask: [[Sourced from::{{PAGENAME}}]]
+
|caption_plural=Documents sourced from {{PAGENAME}}
|mainlabel=Document name
+
|mainlabel=Title
|?Has author=Author(s)
+
|properties=Display docType/Is about/Has publicationDate/Has author/Description
|?Is about=Subject(s)
+
|headers=Type/Subject(s)/Publication date/Author(s)/Description
|?Has publication date=Publication date
+
}}</includeonly><!--
}}
+
2015-07-04 :
<includeonly>
+
Previously, the semantic query included [[Is about::!{{PAGENAME}}]] in order to exclude documents that were listed in another section.
 +
However, this also excludes any documents which don't have subjects (still quite a lot of documents...) so I removed it. As and when
 +
SMW capabilities are improved (or all the documents here are given subjects, if that ever happens) it should be re-inserted. ~~~~
 +
-->

Latest revision as of 23:24, 1 October 2016

Template for use on pages that are referenced by the metadata of pages in the Document and/or File namespaces. It has no parameters.

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

Document(s) sourced from {{PAGENAME}}

Plus a table of sourced document(s) under this heading