Difference between revisions of "Template:Generate concept formlinks from SMW import page"
From TDWG Terms Wiki
m (fix don't include categories) |
m (fix line break) |
||
Line 13: | Line 13: | ||
'''The [[MediaWiki:Smw import {{{ns prefix|}}}|{{abbr|SMW}}-import-page]] defines a name space prefix “{{{ns prefix|}}}” {{#if: {{{title|}}} | (={{{title|}}}) }}and the following concepts:'''<br/><!-- | '''The [[MediaWiki:Smw import {{{ns prefix|}}}|{{abbr|SMW}}-import-page]] defines a name space prefix “{{{ns prefix|}}}” {{#if: {{{title|}}} | (={{{title|}}}) }}and the following concepts:'''<br/><!-- | ||
-->{{#arraymap: {{#var: smwimport}}<!-- | -->{{#arraymap: {{#var: smwimport}}<!-- | ||
+ | |||
+ | split on line break | ||
-->|<nowiki></nowiki> | -->|<nowiki></nowiki> | ||
− | + | <nowiki></nowiki><!-- | |
− | -->{{#switch: {{#explode: §|:|0}}<!-- | + | |
+ | define § as local variable | ||
+ | -->|§<!-- | ||
+ | |||
+ | compose § to form link | ||
+ | -->|{{#switch: {{#explode: §|:|0}}<!-- | ||
exclude if it is a category or class | exclude if it is a category or class | ||
-->|[[Category|[[Class=<!-- | -->|[[Category|[[Class=<!-- | ||
Line 47: | Line 54: | ||
-->}}<!-- switch end | -->}}<!-- switch end | ||
− | -->}} | + | -->}}<!-- switch end |
− | + | ||
− | --> • <!-- | + | output delimiter |
− | -->}}<!-- | + | -->| • <!-- |
+ | -->}}<!-- arraymap | ||
ELSE -->|''The name space prefix “{{{ns prefix|}}}” has no corresponding page [[MediaWiki:Smw import {{{ns prefix|}}}]] yet.''<!-- | ELSE -->|''The name space prefix “{{{ns prefix|}}}” has no corresponding page [[MediaWiki:Smw import {{{ns prefix|}}}]] yet.''<!-- | ||
-->}}</includeonly><noinclude>{{Documentation}}</noinclude> | -->}}</includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 14:18, 24 September 2012
[edit] [ ] Template documentation
This documentation is transcluded from Template:Generate concept formlinks from SMW import page/doc. (edit | history)
Template “Generate concept formlinks from SMW import page” generates a list of formlinks based on a “MediaWiki:Smw_import-ns-prefix”-page
Usage
This template has the following parameter:
{{Generate concept formlinks from SMW import page
|ns prefix= e.g. "dwc" or "rdf" etc.
|title= optional title of the target page
|query string= form_name[field]=value&form_name[field2]=value3 “form_name” must be given, it will be replaced by an appropriate form
}}
Technical documentation
Dependencies: