Help:Templates

From Love and Deepspace Wiki

Templates are one of the core pieces for the Wiki, and understanding how to use them is key to editing the Wiki. You can view all existing templates at Category:Templates.

This is one of several Wiki editing guides, and it is highly recommended to review the ones related to your editing interests.

What are templates[edit source]

Templates are meant to bring consistency and simplicity when creating Wiki content.

  • Consistency - Let's say I want to edit a small detail on the item template. Instead of needing to edit every single item page, I can just edit the template and it will apply across all item pages.
  • Simplicity - Not every editor is proficient in HTML, CSS and JS. Templates help hide this code and creating an easier "form" to fill out.

For example, take the template Template:Tc (Template:Textcolor). Normally if you want to change text color, you'd have to write something like:

<span style="color: orange;">some text here</span>

Instead of writing out this HTML code, instead we can put this code into a template and write something like this instead:

{{Tc|text=some text here|color=orange}}

Instead of needing to remember the HTML, we can just use the Wiki's template syntax and clearly specify text and color. While this example is a relatively simple case, the templates do become more complex.

For example, take a page like Rafayel: Abysswalker. The entire page is rendered through Template:Companion. All the styling, headings, skills, outfits included, etc. are created in this template. If we look at what the template needs to be filled out though, the template simplifies this all down to straightforward fields to fill in. Users just need to fill in the blank, and the template does all the styling.

{{Companion
|name=
|rarity=
|tag1=
|tag2=
|tag3=
|source=
* 
|companionCharacter=
|supportSkillName=
|supportSkillCooldown=
|supportSkillDescription=
|resonanceSkillName=
|resonanceSkillCooldown=
|resonanceSkillCost=
|resonanceSkillDescription=
|ardentOathName=
|ardentOathDescription=
|passiveSkillName=
|passiveSkillDescription=
}}

Useful templates[edit source]

These are some helpful templates outside the templates associated with specific pages. Make sure to review the template documentation to understand how to use the templates.

For a bit more advanced users: