Template:DocumentData
From GxPlex
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=
|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.
Scope(s) is not entered by hand. On Document: pages it is the distinct
RefScope values of all References pointing here, stored as a multi-value
DocScopes and shown as e.g. "G ; HM". On Reference: pages, which transclude
their Document, the box shows the stored DocScopes of that Document.
A scopes= parameter in old page sources is ignored. The same #ask appears
twice (for #set and for the box); the query string is identical, so SMW records it as
one query. @annotation marks it as input for stored values, see
SMW query dependencies. Saving a Reference queues a refresh
of its Document (config/GxPlexHooks.php, section 6).
Validity area: one or more area codes separated by ; (e.g. EU;GBR).
Each code is an Area: page; DocValidityArea is stored as
links to these pages (Page type, multiple values) and shown as links in the box.
Submitted by and Contributors: if the field is empty, the values come from the
page history of the Document ({{#gplxcreator:}} = account that created the page,
{{#gplxcontributors:}} = every account that edited it). A name links to its user page, or
reads "Anonymous" if there is none. Accounts listed in MediaWiki:Gplx-excluded-contributors
are left out (config/GxPlexHooks.php, section 8). Values entered in the form always win.