Difference between revisions of "Template:Generate concept formlinks from SMW import page"

From TDWG Terms Wiki
Jump to: navigation, search
m (use old revision 2729)
m (try to skip […] and )
Line 16: Line 16:
 
<nowiki></nowiki>|§|<!--  
 
<nowiki></nowiki>|§|<!--  
  
   extract import definition
+
   extract import definition, skip […] and [[…]]
  -->{{#switch: {{#explode: {{#explode: {{#explode: §|!|1}} |:|0}} }} <!--
+
  -->{{#ifeq: [ | {{#sub: §|0|1}}<!-
 +
  then-->|<!-
 +
  else-->|<!--
 +
  -->{{#switch: {{#explode: {{#explode: {{#explode: §|!|1}} |:|0}} }} <!--
 
   -->| Type = <!--  
 
   -->| Type = <!--  
  
Line 32: Line 35:
 
      
 
      
 
     Category pages
 
     Category pages
   -->| Category | Class | #default = <span style="display:none">{{#explode: {{#explode: {{#explode: §|!|1}} |:|0}} }}</span><!-- Category pages
+
   -->| Category | Class | #default = <!-- Category pages
 
     -->[[File:Folder-silk.png|link=]]&nbsp;{{#formlink:  
 
     -->[[File:Folder-silk.png|link=]]&nbsp;{{#formlink:  
 
     form=Concept collection<!--   
 
     form=Concept collection<!--   
Line 41: Line 44:
 
     -->|target={{ns:category}}:{{{ns prefix|}}}:{{#explode: §|!|0}}<!--   
 
     -->|target={{ns:category}}:{{{ns prefix|}}}:{{#explode: §|!|0}}<!--   
 
     -->}}<!--
 
     -->}}<!--
-->}}<!-- switch end
+
  -->}}<!--
 +
-->}}<!--  
  
 
   output delimiter
 
   output delimiter

Revision as of 14:47, 24 September 2012

[edit] [purge] Template-info.svg Template documentation

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: