Templates Wiki
Advertisement

Importing instructions[]

Copying instructions[]

How to Copy a Template (based on How to copy templates to your wiki):

  1. Find the template you want to copy (using the search box or the navigation menu).
  2. Create a new template page on your community (https://yourwiki.fandom.com/wiki/Template:templatename?action=edit). If asked to select a template type, choose what seems logical or just pick "Data".
    NOTE: Be careful to read the italicized text for template types as the type will affect how a template is displayed or used on the mobile skin.
    BUGGY: Picking a template type when creating a new template is buggy, so you may have to pick it and save again after you initially save the copied template.
  3. Go back to the template you want to copy, click the EDIT button (or EDIT SOURCE button), make sure to switch to source editor, select all of the wikitext, and copy it.
  4. Paste the wikitext code you copied in the edit box of the destination template on your wiki and press the "Save changes" button.
  5. Add an edit summary.

Copying documentation[]

Many templates in here have a separate subpage for documentation about the template, but they almost never are needed for the template to function. Fortunately, the location is often standardized, so it is easy to copy the documentation as well. If you notice the template page you copied above does not look like the original, it is likely the documentation is on a separate subpage:

  1. Once you go to a template page, click the "this documentation" button.
  2. You will enter to the /doc subpage. Edit the page, make sure to switch to source editor, select all of the wikitext, and copy it.
  3. Create a new template doc page on your community (https://yourwiki.fandom.com/wiki/Template:templatename/doc?action=edit). If asked to select a template type, choose "Non-article".
  4. Paste the wikitext code you copied in the edit box of the destination template doc page on your wiki and press the "Save changes" button.

CSS[]

Some templates may not work without CSS. You can check the documentation of the template and look for a CSS or JS notice (this may sometimes be missing). There should be also an Installation section for a guide to install it.

For templates with a link to a .css subpage, import and export that page to your wiki. Add an import to that page (Instructions available at the page Installation in Dev Wiki), and you're done!

Copy everything to your wiki's common.css. Make sure you credit this wiki, using an edit summary like: Copied CSS code from [[w:c:templates:MediaWiki:Common.css]].

Other dependencies[]

Some templates may not work without images, Lua, MediaWiki extensions, other templates, or subtemplates. You can check the documentation of the template and look for a Dependencies notice (this may sometimes be missing).

Suggested templates[]

There are a few templates it is highly recommended to copy or update from here:

  • {{Documentation (copy)}} is a much-improved documentation template. Be sure to grab its preload template, too.
  • {{T}} is an updated template and includes an extra numbered parameter (to actually support a template name and up to 20 example parameters, as its documentation claims) and a prefix parameter allowing the insertion of subst: and other code into examples.

See also[]

Advertisement