A Wiki in the Desert
Log in

Difference between revisions of "Template:HerbTable"

From A Wiki in the Desert
(Created page with "{| class="wikitable sortable" ! Name ! Method ! Leaves ! Stem ! Color ! Similar ! Str ! Dex ! End ! Spd ! Con ! Foc ! Per ! Image |- {{#loop: i | 0 | {{ #arraysize:{{{herb...")
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable sortable"
+
<includeonly>
! Name
+
{{#ask:
! Method
+
   {{{1}}}
! Leaves
+
   |?requires
! Stem
+
   |?Has leaf
! Color
+
   |?Has stem
! Similar
+
   |?Has color
! Str
+
   |?Is similar to
! Dex
+
   |?Has image
! End
+
   |limit = 500
! Spd
+
   |link = none
! Con
+
   |format = plainlist
! Foc
+
   |introtemplate = HerbTableHeader
! Per
+
   |template = HerbTableBody
! Image
+
   |outrotemplate = HerbTableFooter
|-
 
{{#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