Difference between revisions of "Module:Module wikitext/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Jackmcbarn
(Created page with '<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> == Usage == This is an auxil...')
 
blackwiki>Jackmcbarn
(reflect latest changes)
Line 2: Line 2:
 
== Usage ==
 
== Usage ==
  
This is an auxiliary module used to allow module pages to display wikitext. Use it by overwriting the <code>main</code> method to return whatever content you want to display. The <code>_setText</code> helper method may be useful. For example, to tag a module with {{tl|db-g7}}, put <syntaxhighlight lang="lua" inline>require('Module:Module wikitext')._setText('{{db-g7}}')</syntaxhighlight> at the top of it.
+
This is an auxiliary module used to allow module pages to display wikitext. Use it by setting this module's <code>text</code> value to whatever content you want to display. The <code>_addText</code> helper method may be useful. For example, to tag a module with {{tl|db-g7}}, put <syntaxhighlight lang="lua" inline>require('Module:Module wikitext')._addText('{{db-g7}}')</syntaxhighlight> at the top of it.
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 17:42, 7 September 2020

Usage

This is an auxiliary module used to allow module pages to display wikitext. Use it by setting this module's text value to whatever content you want to display. The _addText helper method may be useful. For example, to tag a module with {{db-g7}}, put require('Module:Module wikitext')._addText('{{db-g7}}') at the top of it.