Template:Concept Table grouped by Collection 2
This template is heavily used in pages with semantic data content. If you alter this template you probably have to update anew all the data pages in this Wiki (see Help:Manage updating concept pages etc. in Semantic MediaWiki) |
This template outputs a single table row (<tr>) that contains generic information about one term (any wrapping <table> must be provided by an external template):
<tr> ───────────┼──────── │ Concept name │ term ┼───────────────┼──────── │ Normative URI │ … ┼───────────────┼─── │ Label │ … ┼───────────────┼─── │ Definition │ … ┼───────────────┼─── │ Defined By │ … ┼───────────────┼─── │ │ Required: No/Yes — Repeatable: Yes/No ┼───────────────┼─── │ Notes: │ … ┼───────────────┼─── </tr>
Technical Documentation
This template was used to render the summary of a concept term within #ask at query time, but later this functionality got shifted to save this generated table layout directly to a property via template: Concept to get quick #ask-inline query response times and limit the calls of templates during the Wiki rendering. To get a quick display property: terms-internal:summary (as table rows) of concept term is used like so:
{{#ask: [[Category:Concept]] [[vann:termGroup::§]] [[vann:termGroup::{{{1|Audubon Core Attribution Vocabulary}}}]] | ?terms-internal:summary (as table rows) of concept term =<!-- the property’s content is generated by template:Concept_Table_grouped_by_Collection_2 in template:Concept --> | link=none | mainlabel=- | sep= | limit={{{limit concepts|500}}} | searchlabel=<i> … further results and concept collection §</i> | sort=terms-internal:lowercasePagename | intro =<div style="font-weight:bold; font-size:105%; margin:1.5em 0 1em 0;">Concept definitions in [[§]]</div> <table cellspacing="0" cellpadding="2" border="0" style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; margin-bottom:10px; width:100%;"> | outro =</table> | default = }}
And property: terms-internal:summary (as table rows) of concept term is saved now by template: Concept, i.e. for all concepts in this Wiki.
The older code took in more render time and has problems when there are a lot of concepts to query for:
{{#ask: [[Category:Concept]] [[vann:termGroup::§]] [[vann:termGroup::{{{1|Audubon Core Attribution Vocabulary}}}]] | ? #- | ?terms-internal:enLabel #- | ?terms-internal:enDefinition #- | ?terms-internal:enExample #- | ?terms-internal:enNote #- | ?rdfs:isDefinedBy #- | ?dcterms:identifier #- | link=none | mainlabel=- | format=template | template=Concept_Table_grouped_by_Collection_2 | limit={{{limit concepts|500}}} | searchlabel=<i> … see also further results in collection {{{1|Audubon Core Attribution Vocabulary}}}</i> | sort=terms-internal:lowercasePagename | intro =<div style="font-weight:bold; font-size:105%; margin:1.5em 0 1em 0;">Concept definitions in [[§]]</div> <table cellspacing="0" cellpadding="2" border="0" style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; margin-bottom:10px; width:100%;"> | outro =</table> | default = }}
Dependencies
- Extension:SemanticMediaWiki
-
#ask
-
- template: Concept
- property: terms-internal:summary (as table rows) of concept term (contains content created by template Concept Table grouped by Collection 2)
- template: Concept Table grouped by Collection (AC1)
- Extension:Variables
- it uses variable
constraintOfConcept
(repeatable, required is saved in property: cardinality but is contained in subobject constraint of concept, which will ask for{{#ask [[constraint of concept::concept-page-name i.e. {{{1}}}]]}}
)
- it uses variable
-
template: Concept to imported URI
TODO
- ✓ reduce template calls, e.g.
{{Concept to imported URI}}
--Andreas Plank (talk) 17:07, 23 January 2020 (CET)- ✓ check further optimisation, e.g. saving rendered table row on the concept level to an internal property (property: terms-internal:summary (as table rows) of concept term) --Andreas Plank (talk) 14:14, 27 January 2020 (CET)
- ✓ refactoring also done for template: Concept Table grouped by Collection (AC1) --Andreas Plank (talk) 15:41, 28 January 2020 (CET)