Difference between revisions of "Template:Book/doc"

From Stoneshard wiki
Jump to navigation Jump to search
m (1 revision imported)
(update to current template)
Line 1: Line 1:
{{Doc/start}}
{{Doc/start}}
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.
This is treatise template created for use together with the [[Template:Tooltip hover box]] template on a specific [[Books & Notes]] page or [[Treatises]] page.


Usage: The page itself must contain the book's data before this Template works. For example, if I wanted to create the [[Monastic Book]] page, I'll add this code to the start of the page and modify the values:
==Usage==
The book's data is loaded from [[Book data]]. This syntax provides the tooltip look and content loaded via the {{tl|Book}} template. Use on pages is combined with float CSS, positioning the result to the right.
  <nowiki>
  <nowiki>
<includeonly>{{#switch: {{{1}}}
<div style="float: right">{{ {{{1|Tooltip hover box}}}|title= {{Book}}}}</div></nowiki>
|BookAuthor=Written by Abbot Vidian
|BookName=
|Description=A hefty old book with a chewed up binding and damp, yellowed pages.
|Price=1
|#default = }</includeonly></nowiki>
This data is invisible on the page itself, thanks to the includeonly tags.


By default the page name is used as the book name. If you want to load a specific book on any page, you can provide its name as a parameter, for example:
<nowiki>
{{ {{{1|Tooltip hover box}}}|title= {{Book|Pyromantic Treatise IV}}}}</nowiki>
{{ {{{1|Tooltip hover box}}}|title= {{Book|Pyromantic Treatise IV}}}}


Next, copy this code to [[Monastic Book]] or [[Monastic Book/Tooltip]] or [[Monastic Book/anything]] page:
==Book Content==
You can also load the text that's written inside a book or treatise by using this transclusion syntax:
  <nowiki>
  <nowiki>
{{ {{{1|Tooltip hover box}}}
{{:Book data|Pyromantic Treatise IV Content}}</nowiki>
|title= {{Book}}
 
}}</nowiki>
{{:Book data|Pyromantic Treatise IV Content}}
It will automatically load the book's data and fill them into this format. Go to [[Monastic Book]] to see the result.
 
{{Doc/end}}
{{Doc/end}}

Revision as of 16:42, 21 June 2023

Template-info.png Documentation

This is treatise template created for use together with the Template:Tooltip hover box template on a specific Books & Notes page or Treatises page.

Usage

The book's data is loaded from Book data. This syntax provides the tooltip look and content loaded via the {{Book}} template. Use on pages is combined with float CSS, positioning the result to the right.

<div style="float: right">{{ {{{1|Tooltip hover box}}}|title= {{Book}}}}</div>

By default the page name is used as the book name. If you want to load a specific book on any page, you can provide its name as a parameter, for example:

{{ {{{1|Tooltip hover box}}}|title= {{Book|Pyromantic Treatise IV}}}}
Pyromantic Treatise IV


Book

Book Content

You can also load the text that's written inside a book or treatise by using this transclusion syntax:

{{:Book data|Pyromantic Treatise IV Content}}

Data does not exist.