Help:Template Guidelines

Search WikiTree's help pages:

Categories: Styles and Standards

Language: en | de | nl


Acceptable Usage

The bulk of the following was formally adopted in September 2016.

Approved: Feature boxes

We use templates for what could be called "feature boxes" or profile boxes. They feature content that is visually and functionally separate from the main body of the page.

They may be used for:

Another acceptable usage is on category pages, to say a subset of categories should be used in a certain way, or in coordination with a given project.

Among the reasons why feature boxes are an approved usage for templates while most other usages are not approved:

  1. It's conceptually easier for some users to understand that a feature box is a separate object that's inserted with a code than to understand the general concept of transclusion.
  2. Since feature boxes are not part of the main body of content, if a user doesn't understand them they can still collaborate at a basic level.

Not approved: Content templates

Templates should not be used to transclude content into the main body of a profile, category, or other page.

As a rule of thumb, content should not be repeated on multiple web pages. If you find yourself wanting to repeat a non-trivial amount of content on multiple WikiTree profiles or pages, consider creating a Free-Space Profile and linking to it from the other profiles or pages.

Among the reasons we don't want to transclude content:

  1. Transclusion is complex. It makes it harder for new and less technically-inclined members to understand and collaborate on profiles. WikiTree is for collaboration.
  2. Transcluded content isn't included in our GEDCOM exports or conventional database dumps. Separating content from profiles means that it may be lost now or in the future. We want the content we're growing to be useful and available long into the future, beyond this website.

Limited: Formatting templates

There are a very limited number of templates for formatting and styling purposes, e.g. for changing the color of text or formatting an image. See Formatting Templates.

These should only be created in coordination with the team and they are subject to being changed.

It is important that the "look and feel" of WikiTree pages be consistent. This makes it easier for members to collaborate across the website, and for users to navigate across the website. There are also serious technical considerations. See the page on HTML and Inline CSS for more information.

Limited: Source templates

Sources are part of our content; see the section on content templates above. However, some source templates have been used by special projects.

New source templates should not be created, and source templates should not be added to profiles. They may not fit in with future technical developments related to sources.

Creating and Editing Templates

Intended usage

If a new template is not a feature box that fits one of the approved usages above, do not use it widely until its type is accepted and listed on this page. New template types need careful consideration and public discussion.

Template namespace

Templates should all be in the "Template:" namespace.

Other pages should not be transcluded on WikiTree pages. This may be technically forbidden at some point.

Keeping templates in the template namespace gives us a measure of control. Only members of the Templates Project can edit these pages.

Naming templates

The meaning of a template should be relatively clear from its title. For example, "Template:Unverified Father" is a good template name while "Template:UF" would not be.

Clear names are important because:

  1. It makes it easier for members to understand and use them. Even someone who does not understand templates may appreciate the function of a code like {{Citation needed}}.
  2. Template content is not transcluded in GEDCOM exports and conventional database dumps. That is, only the template name may appear when the content is used somewhere other than on

Template styling

Formatting and styling on WikiTree should be universal. It is subject to change based on overall website design considerations. See the usage section on formatting templates above.

Accordingly, the style of templates themselves should be standardized.

Ideally, all template styling should be done with separate container templates, e.g. Template:Project Box for project boxes. (Thank you, Rob Ton.) If a container template doesn't exist for the type of feature box being added we should aim to create one.

This page was last modified 13:56, 9 October 2023. This page has been accessed 5,877 times.