A Wiki in the Desert
Log in

Difference between revisions of "Template:HerbTable"

From A Wiki in the Desert
 
(8 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
! Str
+
   |limit = 500
! Dex
+
   |link = none
! End
+
   |format = plainlist
! Spd
+
   |introtemplate = HerbTableHeader
! Con
+
   |template = HerbTableBody
! Foc
+
   |outrotemplate = HerbTableFooter
! Per
 
|-
 
{{#loop: i
 
  | 0
 
  | {{ #arraysize:herbs}}
 
  |{{#arraydefine:properties|{{#ask:[[-Has subobject::{{#arrayindex: herbs|{{ #var:i}}}}]]|link=none|limit=500}}}}
 
  {{!}}-
 
  {{!}}[[Image:Herbs_{{#replace:{{#arrayindex: herbs|{{ #var:i}}}}|Herb/|}}.jpg|thumb|250x250px]]
 
   {{!}}{{#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/|}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Strength}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Dexterity}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Endurance}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Speed}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Constitution}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Focus}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
   {{!}} {{AttributeSign |{{#arrayprint:properties||@@@@|{{#if:{{#pos:@@@@|Perception}}|{{#ask: [[@@@@]] |?Has magnitude#= |mainlabel=-}}}}}}}}
 
  {{!}}-
 
 
}}
 
}}
|}
+
</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