A Wiki in the Desert
Log in

Difference between revisions of "Template:HerbTable"

From A Wiki in the Desert
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#arraydefine:herbs|{{{herbs}}}}}
+
<includeonly>
{| class="wikitable sortable"
+
{{#ask:
! Name
+
   {{{1}}}
! Method
+
   |?requires
! Leaves
+
   |?Has leaf
! Stem
+
   |?Has stem
! Color
+
   |?Has color
! Similar
+
   |?Is similar to
! Str
+
   |?Has image
! Dex
+
   |limit = 500
! End
+
   |link = none
! Spd
+
   |format = plainlist
! Con
+
   |introtemplate = HerbTableHeader
! Foc
+
   |template = HerbTableBody
! Per
+
   |outrotemplate = HerbTableFooter
! Image
 
|-
 
{{#loop: i
 
  | 0
 
  | {{ #arraysize:herbs}}
 
  |{{#arraydefine:properties|{{#ask:[[-Has subobject::{{#arrayindex: herbs|{{ #var:i}}}}]]|link=none|limit=500}}}}
 
  {{!}}-
 
   {{!}}{{#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=-}}}}}}}}
 
  {{!}}[[Image:Herbs_{{#replace:{{#arrayindex: herbs|{{ #var:i}}}}|Herb/|}}.jpg|thumb|250x250px]]
 
  {{!}}-
 
 
}}
 
}}
|}
+
</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