Template:Concept Table grouped by Collection 2

From TDWG Terms Wiki
Jump to: navigation, search

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

TODO