Personal tools

Sponsorname

Your company could advertise here

www.fla-consulting.eu

Template:DocumentData: Difference between revisions

From GxPlex

Jump to: navigation, search
Add Template:DocumentData for PageForms
 
Add preview column to References query
 
(One intermediate revision by the same user not shown)
Line 26: Line 26:
Properties are only set on Document: pages themselves ({{NAMESPACE}} check below) — not when
Properties are only set on Document: pages themselves ({{NAMESPACE}} check below) — not when
a Document: page is transcluded onto a Reference: page via <code><nowiki>{{:Document:...}}</nowiki></code>,
a Document: page is transcluded onto a Reference: page via <code><nowiki>{{:Document:...}}</nowiki></code>,
which would otherwise duplicate Doc* properties onto the Reference: page.
which would otherwise duplicate Doc* properties onto the Reference: page. The same check gates
the "References" section: a live [[Help:Semantic MediaWiki|#ask]] query listing every Reference:
page whose <code>has_document</code> field points here, so newly created references appear
automatically without editing this page — no manual table to keep in sync.


[[Category:Templates]]
[[Category:Templates]]
Line 58: Line 61:
|submitted_by={{{submitted_by|}}}
|submitted_by={{{submitted_by|}}}
|contributors={{{contributors|}}}
|contributors={{{contributors|}}}
}}
{{#ifeq:{{NAMESPACE}}|Document|
== References ==
{{#ask: [[Reference:+]] [[HasDocument::{{FULLPAGENAME}}]]
| ?RefScope = Scope
| ?RefDocPart = Document part
| ?RefLanguage = Language
| ?RefPreview = Preview
| format = table
| headers = show
| limit = 500
| sort = RefDocPart
| default = ''No references yet.''
}}
}}</includeonly>
}}</includeonly>

Latest revision as of 14:18, 16 July 2026

Data template for Document: pages. Used by Form:Document. Sets the same SMW properties and renders the same

Document information
Reference
Validity area
Scope(s)
Document name
Version / Revision
Status
Document type
Language(s)
Description
Official source —
Restricted access No
Submitted by
Contributors

infobox that the Excel-based XML import produces, so

existing imported pages can be edited through the form without losing data.

Usage

{{DocumentData
|reference=
|validity_area=
|scopes=
|doc_name=
|version=
|status=
|doc_type=
|language=
|description=
|official_link=
|restricted=No
|submitted_by=
|contributors=
}}

Properties are only set on Document: pages themselves (Template check below) — not when a Document: page is transcluded onto a Reference: page via {{:Document:...}}, which would otherwise duplicate Doc* properties onto the Reference: page. The same check gates the "References" section: a live #ask query listing every Reference: page whose has_document field points here, so newly created references appear automatically without editing this page — no manual table to keep in sync.