Home
Random
Log in
Settings
About RuneScape: Dragonwilds Wiki
Disclaimers
Search
Editing
Module:Mainonly
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
--[[ {{Helper module|name=Mainonly |fname1=_main(arg) |ftype1=Any value |fuse1=If the module is invoked in the content namespace, it will return arg, otherwise, it will return an empty string |fname2=on_main() |ftype2=N/A |fuse2=Returns true if invoked in the content namespace, otherwise false }} --]] -- -- Module to return text only when invoked in the content namespace -- local p = {} function p.main(frame) local ret = frame:getParent().args[1] or '' return p._main(ret) end function p._main(text) if mw.title.getCurrentTitle().namespace == 0 then return text else return '' end end -- -- Boolean for whether or not the page is in the mainspace -- Sometimes it might be better to just check first -- Rather than spend processing time on something that won't be used function p.on_main() return mw.title.getCurrentTitle().namespace == 0 end return p
Summary:
Please note that all contributions to RuneScape: Dragonwilds Wiki are considered to be released under the CC BY-NC-SA 3.0 (see
Dragonwilds: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)
Preview page with this template
Pages included on this page:
Template:Clear
(
edit
)
Template:DependencyList
(
edit
)
Template:DependencyList/doc
(
edit
)
Template:Documentation
(
edit
)
Template:Mainonly
(
edit
)
Template:Mainonly/doc
(
edit
)
Template:No documentation
(
edit
)
Template:PageType
(
edit
)
Module:Array
(
edit
)
Module:DPLlua
(
edit
)
Module:DependencyList
(
edit
)
Module:Documentation
(
edit
)
Module:InfoboxBuilder
(
edit
)
Module:Infobox Deity
(
edit
)
Module:Infobox Soundtrack
(
edit
)
Module:Mainonly/doc
(
edit
)
Module:Navbox
(
edit
)
Module:Paramtest
(
edit
)
Module:References
(
edit
)
Module:Tooltip
(
edit
)
Module:User error
(
edit
)
Module:Yesno
(
edit
)
This page is a member of 2 hidden categories:
Category:Pages using DynamicPageList4 parser function
Category:Pages using DynamicPageList4