Difference between revisions of "Template:Treatise"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(added translation templates, changed template to use data storage on main treatise pages)
old>Realpsojed
(Active and Passive skills into individual params, for link functionality)
Line 7: Line 7:
|style="color:#9d9a9a;"|<br>{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|LearnText}} | {{Translate|{{ROOTPAGENAME}} LearnText|Treatises}}}} | {{:{{ROOTPAGENAME}}|LearnText}}}}<br><br>
|style="color:#9d9a9a;"|<br>{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|LearnText}} | {{Translate|{{ROOTPAGENAME}} LearnText|Treatises}}}} | {{:{{ROOTPAGENAME}}|LearnText}}}}<br><br>
|-
|-
|<div style="float: left;">{{cl|active|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|ActiveSkills}} | {{Translate|{{ROOTPAGENAME}} ActiveSkills|Treatises}}}} | {{:{{ROOTPAGENAME}}|ActiveSkills}}}}}}</div>{{clear}}
|<div style="float: left;">{{cl|active|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|ActiveSkill1}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill2}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill3}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill4}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill5}} | {{Translate|{{ROOTPAGENAME}} ActiveSkill1|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} ActiveSkill2|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} ActiveSkill3|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} ActiveSkill4|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} ActiveSkill5|Treatises}}}} | {{:{{ROOTPAGENAME}}|ActiveSkill1}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill2}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill3}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill4}}<br>{{:{{ROOTPAGENAME}}|ActiveSkill5}}}}}}</div>{{clear}}
<div style="float: left;">{{cl|orange|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|PassiveSkills}} | {{Translate|{{ROOTPAGENAME}} PassiveSkills|Treatises}}}} | {{:{{ROOTPAGENAME}}|PassiveSkills}}}}}}</div>
<div style="float: left;">{{cl|orange|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|PassiveSkill1}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill2}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill3}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill4}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill5}} | {{Translate|{{ROOTPAGENAME}} PassiveSkill1|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} PassiveSkill2|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} PassiveSkill3|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} PassiveSkill4|Treatises}}<br>{{Translate|{{ROOTPAGENAME}} PassiveSkill5|Treatises}}}} | {{:{{ROOTPAGENAME}}|PassiveSkill1}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill2}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill3}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill4}}<br>{{:{{ROOTPAGENAME}}|PassiveSkill5}}}}}}</div>
|-
|-
|style="color:#9d7969;text-align:justify"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|Treatises}}}} | {{:{{ROOTPAGENAME}}|Description}}}}<div style="float: right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{{Price}}}}}</div><br>
|style="color:#9d7969;text-align:justify"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|Treatises}}}} | {{:{{ROOTPAGENAME}}|Description}}}}<div style="float: right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{{Price}}}}}</div><br>

Revision as of 11:49, 9 October 2020

Template-info.png Documentation

This is treatise template created for use together with the Template:Tooltip hover box template on a specific treatise's page or treatise's tooltip page.

Usage: The page itself must contain the treatise's data before this Template works. For example, if I wanted to create the Geomantic Treatise I page, I'll add this code to the start of the page and modify the values:

<includeonly>{{#switch: {{{1}}}
|BookAuthor=Written by Joran of Brynn
|BookName=Travelling notes on my journey to Biest
|LearnText=Allows to learn some geomantic abilities:
|ActiveSkill1=Runic Boulder
|ActiveSkill2=Stone Armor
|PassiveSkill1=Rune of Enfeeblement
|Description=A rather chaotic journal by a professor of linguistics who taught in Brynn a century ago. Perhaps the most fascinating read of the entire Grammar curriculum at Brynn University.
|Price=400
|Image=
|#default = }}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Geomantic Treatise I or Geomantic Treatise I/Tooltip or Geomantic Treatise I/anything page:

{{ {{{1|Tooltip hover box}}}
|title= {{Treatise}}
}}

It will automatically load the treatise's data and fill them into this format. Go to Geomantic Treatise I to see the result.