Difference between revisions of "Template:Friendly/doc"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(Created page with "{{Doc/start}} This is template created for use together with the Template:Tooltip hover box template on a specific Friendly NPC's page or Friendly NPC's tooltip page. Usa...")
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:


  <nowiki><includeonly>{{#switch: {{{1}}}
  <nowiki><includeonly>{{#switch: {{{1}}}
|Name = (optional)
|Occupation = Herbalist
|Occupation = Herbalist
|Residence = Osbrook
|Residence = Osbrook
Line 12: Line 13:
This data is invisible on the page itself, thanks to the includeonly tags.
This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to [[Frid]] or [[Frid/anything]] page:
<nowiki>
{{ {{{1|Tooltip hover box}}}
|title= {{Friendly}}
}}</nowiki>


Next, copy this code to [[Frid]] or [[Frid/Tooltip]] or [[Frid/anything]] page:
Adding a parameter specifies which NPC to show (default is current page name):
  <nowiki>
  <nowiki>
{{ {{{1|Tooltip hover box}}}
{{ {{{1|Tooltip hover box}}}
|title= {{Friendly}}
|title= {{Friendly|Frid}}
}}</nowiki>
}}</nowiki>
It will automatically load the sword's data and fill them into this format. Go to [[Frid]]'s page to see the result.
 
Result:
{{ {{{1|Tooltip hover box}}}|title= {{Friendly|Frid|category=no}}}}
 
{{Doc/end}}
{{Doc/end}}

Latest revision as of 15:29, 9 October 2025

Template-info.png Documentation

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

Usage: The page itself must contain the Friendly NPC's data before this Template works. For example, if I wanted to create the Frid page, I'll add this code to the start of the page:

<includeonly>{{#switch: {{{1}}}
|Name = (optional)
|Occupation = Herbalist
|Residence = Osbrook
|Sells = Herbs, Medicine, Scrolls
|#default = 
}}</includeonly>

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

Next, copy this code to Frid or Frid/anything page:

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

Adding a parameter specifies which NPC to show (default is current page name):

{{ {{{1|Tooltip hover box}}}
|title= {{Friendly|Frid}}
}}

Result:

Frid Name: Frid

Occupation: Herbalist
Residence: Osbrook
Sells: Herbs, Medicine, Scrolls