Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Navboxes
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.
Anti-spam check. Do
not
fill this in!
-- This implements Template:navboxes local p = {} local getArgs = require('Module:Arguments').getArgs local Navbox = require('Module:Navbox') local function isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local function navboxes(args, list) local navbar = (args['state'] and args['state'] == 'off') and 'off' or 'plain' local title = args['title'] or 'Links to related articles' local titlestyle = 'background:' .. (args['bg'] or '#e8e8ff') .. ';' .. (isnotempty(args['fg']) and ('color:' .. args['fg'] .. ';') or '') .. (isnotempty(args['bordercolor']) and ('border: 1px solid ' .. args['bordercolor'] .. ';') or '') .. (args['titlestyle'] or '') return Navbox._navbox({ navbar = navbar, title = title, list1 = list, state = args['state'] or 'collapsed', titlestyle = titlestyle, liststyle = 'font-size:114%', listpadding = '0px', tracking = 'no' }) end function p.top(frame) local args = getArgs(frame) local parts = mw.text.split(navboxes(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[1] end function p.bottom(frame) local args = {} local parts = mw.text.split(navboxes(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[2] end function p.navbox(frame) local args = getArgs(frame) local list = args['list1'] or args['list'] or '' local track_cats = '' if list == '' then if mw.title.getCurrentTitle().namespace == 0 then track_cats = '[[Category:Navboxes template with no content]]' end end return navboxes(args, list) .. track_cats end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:High-use
(
edit
)
Template:Lua
(
edit
)
Template:Tl
(
edit
)
Module:Navboxes/doc
(
edit
)