Editing MediaWiki/Editing/Advanced

From Bibliotheca Anonoma

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 122: Line 122:
== Creating Templates ==
== Creating Templates ==


{{Note|Template documentation is set up the same way as in the Arch Wiki: inside <code><nowiki><includeonly></includeonly></nowiki></code> tags. This is simpler, if less clean than the Wikipedia template documentation, which puts it in a subpage.}}
=== Documentation Method 2: Wikipedia-style /doc Subpage ===
 
Subpages are a cleaner way of keeping the documentation separate from the main template, while still allowing the documentation to appear on the template page.
 
While Wikipedia's documentation system has become incredibly complex through the addition of Lua modules, templates from a simpler time still exist out there and we can use them.
 
http://pathfinderwiki.com/mediawiki/index.php?title=Template:Documentation
 
=== Documentation Method 1: Arch Wiki-style <nowiki><noinclude></nowiki> ===


When creating a template meant for users to utilize, you should place a <code><nowiki>{{Template}}</nowiki></code> header into it.
When creating a template meant for users to utilize, you should place a <code><nowiki>{{Template}}</nowiki></code> header into it.
Line 134: Line 142:
</pre>
</pre>


Documentation of the template, usage instructions, and output example should also be added between the 'noinclude' tags (as in this template).
A brief description of the template, usage instructions, and output example should also be added between the 'noinclude' tags (as in this template).


The actual template code must be written between 'includeonly' tags:
The template wikitext must be written between 'includeonly' tags:


<pre>
<pre>
<includeonly>...</includeonly>
<includeonly>...</includeonly>
</pre>
</pre>
{{Note|Template documentation is set up the same way as in the Arch Wiki: inside <code><nowiki><includeonly></includeonly></nowiki></code> tags. This is simpler than the Wikipedia template documentation, which puts it in a subpage.}}
Please note that all contributions to Bibliotheca Anonoma are considered to be released under the Creative Commons Attribution-ShareAlike (see Bibliotheca Anonoma:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)