A Wiki in the Desert
Log in

Difference between revisions of "Template:HerbTable"

From A Wiki in the Desert
(Undo revision 163707 by Omegaice (talk))
Tag: Undo
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#arraydefine:herbs|{{{1}}}}}
+
<includeonly>
{| class="wikitable sortable"
+
{{#ask:
! Image
+
  {{{1}}}
! Name
+
  |?requires
! Method
+
   |?Has leaf
! Leaves
+
   |?Has stem
! Stem
+
   |?Has color
! Color
+
   |?Is similar to
! Similar
+
   |?Has image
|-
+
   |limit = 500
{{#loop: i
+
   |link = none
   | 0
+
   |format = plainlist
   | {{ #arraysize:herbs}}
+
   |introtemplate = HerbTableHeader
   |{{#arraydefine:properties|{{#ask:[[-Has subobject::{{#arrayindex: herbs|{{ #var:i}}}}]]|link=none|limit=500}}}}
+
   |template = HerbTableBody
   {{!}}-
+
   |outrotemplate = HerbTableFooter
   {{!}}[[Image:Herbs_{{#replace:{{#replace:{{#arrayindex: herbs|{{ #var:i}}}}|Herb/|}}| |}}.jpg|thumb|250x250px]]
 
   {{!}}[[{{#arrayindex: herbs|{{ #var:i}}}}|{{#replace:{{#arrayindex: herbs|{{ #var:i}}}}|Herb/|}}]]
 
   {{!}}{{#replace:{{#ask: [[{{#arrayindex: herbs|{{ #var:i}}}}]] |?requires#= |mainlabel=-}}|Action/|}}
 
   {{!}}{{#replace:{{#ask: [[{{#arrayindex: herbs|{{ #var:i}}}}]] |?Has leaf#= |mainlabel=-}}|Herb/Leaf/|}}
 
   {{!}}{{#replace:{{#ask: [[{{#arrayindex: herbs|{{ #var:i}}}}]] |?Has stem#= |mainlabel=-}}|Herb/Stem/|}}
 
   {{!}}{{#replace:{{#ask: [[{{#arrayindex: herbs|{{ #var:i}}}}]] |?Has color#= |mainlabel=-}}|Herb/Color/|}}
 
   {{!}}{{#replace:{{#ask: [[{{#arrayindex: herbs|{{ #var:i}}}}]] |?Is similar to#= |mainlabel=-}}|Herb/|}}
 
  {{!}}-
 
 
}}
 
}}
|}
+
</includeonly>
 +
<noinclude>
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Query",
 +
"description": "A semantic media query to restrict the results",
 +
"example": "[[Category:Herb]]",
 +
"type": "string",
 +
"required": true
 +
}
 +
},
 +
"description": "This template runs a semantic query and generates a table from the resulting herbs."
 +
}
 +
</templatedata>
 +
</noinclude>

Latest revision as of 18:52, 25 May 2021


This template runs a semantic query and generates a table from the resulting herbs.

Template parameters

ParameterDescriptionTypeStatus
Query1

A semantic media query to restrict the results

Example
[[Category:Herb]]
Stringrequired