Project page: Edit

Editing BattleTechWiki:Template namespace

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 save the changes below to finish undoing the edit.

Latest revision Your text
Line 79: Line 79:
  
 
===Modules===
 
===Modules===
[[BTW:Lua|Lua]] modules are sometimes used instead of templates to store reusable material. Reasons for this include usage of module-specific features such as [[w:loop (programming)|loops]] or stored values, and complex code is often easier to read and maintain in a module. If a module is easily implementable in a template it generally should be, since there are more users with experience editing templates.
+
[[BTW:Lua|Lua]] modules are sometimes used instead of templates to store reusable material. Reasons for this include usage of module-specific features such as [[loop (programming)|loops]] or stored values, and complex code is often easier to read and maintain in a module. If a module is easily implementable in a template it generally should be, since there are more users with experience editing templates.
  
 
If a module is intended to be used in articles or talk pages, a template wrapper should generally be created to simplify usage without directly requiring the <code>#invoke</code> parser function. Documentation is then mostly located on the template's /doc page, with the module's documentation pointing to the template and/or explaining further technical details that are unnecessary at the primary template documentation.
 
If a module is intended to be used in articles or talk pages, a template wrapper should generally be created to simplify usage without directly requiring the <code>#invoke</code> parser function. Documentation is then mostly located on the template's /doc page, with the module's documentation pointing to the template and/or explaining further technical details that are unnecessary at the primary template documentation.
  
There are sometimes reasons not to use a template wrapper, however, such as causing potential issues with [[w:Help:Template limits|template limits]]; a template wrapper that passes too many parameters to a module is much less efficient compared to a direct invocation. Additionally, it is generally not desirable to use template wrappers in other templates.
+
There are sometimes reasons not to use a template wrapper, however, such as causing potential issues with [[BTW:template limits|template limits]]; a template wrapper that passes too many parameters to a module is much less efficient compared to a direct invocation. Additionally, it is generally not desirable to use template wrappers in other templates.
  
 
== Searching for templates ==
 
== Searching for templates ==

Please note that all contributions to BattleTechWiki are considered to be released under the GNU FDL 1.2 (see BattleTechWiki: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!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Advanced templates:

Editing: {{Merge}}   {{Moratorium}}   {{Otheruses| | | }}

Notices: {{NoEdit}}   {{Sign}}   {{Unsigned|name}}   {{Welcome}}

Administration: {{Essay}}   {{Policy}}   {{Procedure}}

Templates used on this page:

This page is a member of 1 hidden category: