Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Join the Playtest on Steam Now: SpiritVale

Guides:Eviand's Wiki Guide Creation: Difference between revisions

From SpiritVale Wiki
No edit summary
Line 42: Line 42:


== Templates and What They Do ==
== Templates and What They Do ==
Templates are reusable page components that you “transclude” (which is a fancy word for "insert directly into a page") into another page. This lets you reuse complex formatting with simple parameters.
Templates are reusable page pieces you can drop into any page. They save time by handling the fancy formatting for you—you just fill in the fields.
 
---
 
=== Option 1: Visual Editor (recommended) ===
Use this if you prefer forms and buttons.
 
[[File:Edit Template Example.png|center|600px|alt=Editing a template in Visual Editor]]
 
'''To insert a new template'''
# Click '''Edit''' at the top of the page (not “Edit source”).
# In the toolbar, choose '''Insert → Template''' (puzzle-piece icon).
# Search for the template name (for example, '''ClassInfoBox'''), then click '''Add template'''.
# A form opens with fields, examples, and short descriptions. Fill in what you know.
# Click '''Insert''' (or '''Apply changes'''), then '''Publish changes'''.
 
'''To edit an existing template on the page'''
# In Visual Editor, {{lc:first letter|double-click}} the template table/box, or click the small '''Edit''' button on it.
# Update any fields you want. (Tip: use '''Hide unused''' to keep the list short.)
# Click '''Apply changes''', then '''Publish changes'''.
 
*You can leave fields blank—most templates hide empty info automatically.*
 
---
 
=== Option 2: Edit Source (advanced) ===
Use this if you like wikitext.


A basic insert looks like this:
A basic insert looks like this:
  <nowiki>{{Example Insert
  <nowiki>
{{Example Insert
| Example Parameter = Example Value
| Example Parameter = Example Value
}} </nowiki>
}}
</nowiki>


This will check for a template page called "Example Insert", and then you can fill in all the values. When you "Save changes" the insert transforms into the template, and automatically fills out all the empty fields.
When you save, the wiki turns that block into the styled template
You can switch between editors any time:
* In Visual Editor: menu (⋯) → '''Switch to source editing'''
* In Source Editor: use the “Switch to visual editing” button (if available) or click the normal '''Edit''' tab next time.


It allows the creation of fancy tables like this, without any programming skills.
'''Example (source)'''
 
  <nowiki>
Example:
{{ClassInfoBox
 
| Role   = Melee <br> Poison
  <nowiki>{{ClassInfoBox
| Role = Melee <br> Poison
| Weapons = Dagger
| Weapons = Dagger
| STR = 9
| STR = 9 | AGI = 12 | VIT = 1
| AGI = 12
| INT = 1 | DEX = 9 | LUK = 1
| VIT = 1
| INT = 1
| DEX = 9
| LUK = 1
}}
}}
  </nowiki>
  </nowiki>
 
'''Result'''
{{ClassInfoBox
{{ClassInfoBox
| Role = Melee <br> Poison
| Role   = Melee <br> Poison
| Weapons = Dagger
| Weapons = Dagger
| STR = 9
| STR = 9 | AGI = 12 | VIT = 1
| AGI = 12
| INT = 1 | DEX = 9 | LUK = 1
| VIT = 1
| INT = 1
| DEX = 9
| LUK = 1
}}
}}


 
'''Tips'''
 
* Spell item/map names exactly to help auto-links work.
You can also use the normal edit function to directly edit a table. Simply doubleclick on any inserted template, and a popup box will show up that will let you enter in all the individual fields:
* Use <nowiki><br/></nowiki> to add a new line inside a field.
 
* If a link shows red, the page title might be misspelled or missing—double-check.
[[File:Edit Template Example.png|250px]]


== Wiki Headers (Sections) ==
== Wiki Headers (Sections) ==