Difference between revisions of "Template:Concept Table grouped by Collection 1"
m (programmer note on property: terms-internal:summary (as table rows) of concept term) |
m (+documentation) |
||
Line 22: | Line 22: | ||
{{FULLPAGENAME}} | {{FULLPAGENAME}} | ||
└─ #ask (for concepts within the given collection) | └─ #ask (for concepts within the given collection) | ||
− | └─ [[template: Concept Table grouped by Collection 2]] | + | └─ display table layout via [[property: terms-internal:summary (as table rows) of concept term]] |
− | + | (generated table layout of [[template: Concept Table grouped by Collection 2]]) | |
If you want to display concepts of ''just one'' collection (use case 1) use it as follows (here limited to just 2 concepts for this example): | If you want to display concepts of ''just one'' collection (use case 1) use it as follows (here limited to just 2 concepts for this example): | ||
Line 39: | Line 39: | ||
└─ {{FULLPAGENAME}} | └─ {{FULLPAGENAME}} | ||
└─ #ask (for concepts within previous results of concept collections) | └─ #ask (for concepts within previous results of concept collections) | ||
− | └─ [[template: Concept Table grouped by Collection 2]] | + | └─ display table layout via [[property: terms-internal:summary (as table rows) of concept term]] |
− | + | (generated table layout of [[template: Concept Table grouped by Collection 2]]) | |
− | If you want to query for multiple concept collections (usecase 2: here in [[GGBN Data Standard]]) you can use it with an <code>#ask</code>-query as follows: | + | If you want to query for multiple concept collections (usecase 2: here all collections in scheme [[GGBN Data Standard]]) you can use it with an <code>#ask</code>-query as follows: |
<nowiki>{{</nowiki>#ask: <nowiki>[[</nowiki>Category:Concept collection]] <nowiki>[[</nowiki>skos:inScheme::GGBN Data Standard]] | <nowiki>{{</nowiki>#ask: <nowiki>[[</nowiki>Category:Concept collection]] <nowiki>[[</nowiki>skos:inScheme::GGBN Data Standard]] | ||
| ? #- | | ? #- | ||
Line 53: | Line 53: | ||
}} | }} | ||
− | Note that the parameter <code><nowiki>|limit=20</nowiki></code> may be crucial here: | + | Note that the <code>#ask</code>-parameter <code><nowiki>|limit=20</nowiki></code> may be crucial here: |
− | * depending on the concept scheme this means it queries for 20 collections and within | + | * depending on the size of the concept scheme this means it queries for 20 collections and within each, all (up to <code><nowiki>|limit concepts=500</nowiki></code>) concepts |
* if there are more results, then at the bottom a link will appear to see further results | * if there are more results, then at the bottom a link will appear to see further results | ||
* if the concept collection is too large (over 1000 concepts) this template may not be able to show all concepts and you can get a warning like: | * if the concept collection is too large (over 1000 concepts) this template may not be able to show all concepts and you can get a warning like: | ||
Line 61: | Line 61: | ||
Pages that have too much template calls can be found in this maintenance [[:category: Pages where template include size is exceeded]]. | Pages that have too much template calls can be found in this maintenance [[:category: Pages where template include size is exceeded]]. | ||
− | Technically this template relies on values generated by [[template: Concept Table grouped by Collection 2]] | + | Technically this template relies on values generated by [[template: Concept Table grouped by Collection 2]] via [[template: Concept]]. This approach ensures to get a quick display response time in Semantic MediaWiki to just display cached content and not to render the content during the #ask-inline query. [[Template: Concept Table grouped by Collection 2]] also produces the actual table layout. On a concept page it sets some thing like: |
<pre> | <pre> |
Revision as of 13:40, 28 January 2020
This template displays definitions of terms in a table layout grouped by concept collections. It can be and is usually invoked by a previous #ask query.
Contents
Technical Documentation
Parameters
- |1=
- concept collection name
- |limit concepts=
- the limit of concepts to
#ask
for subsequently (default: 500)
Note: that parameter 1 can also be provided by an #ask query wrapping this template (see use case 2).
Example/Usage
Use cases can be:
Use case 1 (to query just one collection)
Template:Concept Table grouped by Collection 1 └─ #ask (for concepts within the given collection) └─ display table layout via property: terms-internal:summary (as table rows) of concept term (generated table layout of template: Concept Table grouped by Collection 2)
If you want to display concepts of just one collection (use case 1) use it as follows (here limited to just 2 concepts for this example):
{{Concept Table grouped by Collection 1|Audubon Core Attribution Vocabulary|limit concepts=2}}
… wich results in
Audubon Core Attribution Vocabulary
Concept Name: | ac:attributionLinkURL |
Normative URI | http://rs.tdwg.org/ac/terms/attributionLinkURL |
Label | Attribution Link URL |
Definition | The URL where information about ownership, attribution, etc. of the resource may be found. |
Defined By | http://terms.tdwg.org/wiki/Audubon_Core_Term_List#ac:attributionLinkURL |
Required: No — Repeatable: No | |
Notes: | Audubon Core: This URL may be used in creating a clickable logo. Providers should consider making this link as specific and useful to consumers as possible, e. g., linking to a metadata page of the specific image resource rather than to a generic page describing the owner or provider of a resource. |
Concept Name: | ac:attributionLogoURL |
Normative URI | http://rs.tdwg.org/ac/terms/attributionLogoURL |
Label | Attribution URL |
Definition | The URL of the icon or logo image to appear in source attribution. |
Defined By | http://terms.tdwg.org/wiki/Audubon_Core_Term_List#ac:attributionLogoURL |
Required: No — Repeatable: No | |
Notes: | Audubon Core: Entering this URL into a browser should only result in the icon (not in a webpage including the icon). |
Use case 2 (to query multiple concept collections)
#ask (for multiple concept collections) └─ Template:Concept Table grouped by Collection 1 └─ #ask (for concepts within previous results of concept collections) └─ display table layout via property: terms-internal:summary (as table rows) of concept term (generated table layout of template: Concept Table grouped by Collection 2)
If you want to query for multiple concept collections (usecase 2: here all collections in scheme GGBN Data Standard) you can use it with an #ask
-query as follows:
{{#ask: [[Category:Concept collection]] [[skos:inScheme::GGBN Data Standard]] | ? #- | link=none | mainlabel=- | format=template | template=Concept Table grouped by Collection 1 | searchlabel=<i> … see also further results and collections</i> | limit=20 }}
Note that the #ask
-parameter |limit=20
may be crucial here:
- depending on the size of the concept scheme this means it queries for 20 collections and within each, all (up to
|limit concepts=500
) concepts - if there are more results, then at the bottom a link will appear to see further results
- if the concept collection is too large (over 1000 concepts) this template may not be able to show all concepts and you can get a warning like:
Warning: Template include size is too large. Some templates will not be included.
Pages that have too much template calls can be found in this maintenance category: Pages where template include size is exceeded.
Technically this template relies on values generated by template: Concept Table grouped by Collection 2 via template: Concept. This approach ensures to get a quick display response time in Semantic MediaWiki to just display cached content and not to render the content during the #ask-inline query. Template: Concept Table grouped by Collection 2 also produces the actual table layout. On a concept page it sets some thing like:
{{#set: terms-internal:summary (as table rows) of concept term={{#ask: [[{{PAGENAME}}]] |format=template |template=Concept Table grouped by Collection 2 |mainlabel=- |? #- <!-- page name --> |?terms-internal:enLabel #- <!-- english label --> |?terms-internal:enDefinition #- <!-- english definition --> |?terms-internal:enExample #- <!-- english example --> |?terms-internal:enNote #- <!-- english notes --> |?rdfs:isDefinedBy #- <!-- the is definded by --> |?dcterms:identifier #- <!-- the URI --> }} }}