Module:XGUP
Appearance
From Meta, a Wikimedia project coordination wiki
Module documentation
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this module.
localexport={} localfunctionsubpage_if_exists(frame,args,subpage) localuser_subpage=mw.title.getCurrentTitle().fullText ..( args['prefix'] and(args['prefix']=='-'and''orargs['prefix']) or'/userpages' ) ..'/' ..subpage returnmw.title.new(user_subpage).exists andframe:expandTemplate{title=user_subpage} ornil end functionexport.main(frame) localargs=frame:getParent().args returnsubpage_if_exists(frame,args,mw.ustring.gsub(frame:preprocess('{{USERLANGUAGE}}'),'-','/')) orsubpage_if_exists(frame,args,args['default']or'default') orframe:expandTemplate{title='Template:xGUP/boilerplate'} end returnexport