Jump to content

Module:Article stub box and Module:Article stub box/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
Escape `{{` in output to avoid a Parsoid bug. See Wikipedia:AutoWikiBrowser/Tasks#c-Anomie-20250302162200-Anomie-20250302155000 for details.
 
No edit summary
 
Line 12: Line 12:
--]]
--]]
local WRAPPER_TEMPLATE, args = 'Template:Article stub box'
local WRAPPER_TEMPLATE, args = 'Template:Article stub box'
-- TODO: update this instance of Asbox to Article stub box eventually
local templatestyles = 'Module:Article stub box/styles.css'
local templatestyles = 'Module:Article stub box/styles.css'
local p, Buffer, stubCats = {
local p, Buffer, stubCats = {
Line 181: Line 180:
require('Module:Documentation').main{
require('Module:Documentation').main{
content = Buffer(page.text ~= 'Stub' and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree
content = Buffer(page.text ~= 'Stub' and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree
-- TODO: update this instance of Asbox to Article stub box eventually
require('Module:Asbox stubtree').subtree{args = {pagename = page.text}}
require('Module:Asbox stubtree').subtree{args = {pagename = page.text}}
)
)
:_in'\n== About this template ==\nThis template is used to identify a':_(args.subject):_'stub':_(args.qualifier):_out' '--space
:_in'\n== About this template ==\nThis template is used to identify a':_(args.subject):_'stub':_(args.qualifier):_out' '--space
:_'. It uses {{[[Template:Article stub box|article stub box]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping '
:_'. It uses {{[[Template:Asbox|asbox]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping '
:_(mw.html.create'code'
:_(mw.html.create'code'
:wikitext( mw.text.nowiki( '{{' ), page.text == 'Stub' and 'stub' or page.text, '}}')
:wikitext('{{', page.text == 'Stub' and 'stub' or page.text, '}}')
)
)
:_' produces the message shown at the beginning, and adds the article to the following categor'
:_' produces the message shown at the beginning, and adds the article to the following categor'
Line 199: Line 197:
:_(frame:expandTemplate{title = tStubDoc.text})
:_(frame:expandTemplate{title = tStubDoc.text})
:_'\n\n'(),
:_'\n\n'(),
['link box'] = Buffer'This documentation is automatically generated by [[Module:Article stub box]].'
['link box'] = Buffer'This documentation is automatically generated by [[Module:Asbox]].'
:_in'The general information is transcluded from [[Template:Stub documentation]]. '
:_in'The general information is transcluded from [[Template:Stub documentation]]. '
:_(mw.html.create'span'
:_(mw.html.create'span'