Template talk:Navbox/Archive 5

'name' parameter
It's occurred to me that this parameter might be superfluous - wouldn't this template work if 'name' was taken to be (i.e. the equivalent of specifying "name =  " for every Navbox template in its current form)...? Sardanaphalus (talk) 13:10, 29 February 2008 (UTC)

PS Anyone able+willing to take any action as regards the above...? —Preceding unsigned comment added by Sardanaphalus (talk • contribs) 13:18, 29 February 2008 (UTC)


 * No, the name must be specified (which can be done with ) on the template itself, as that is what the link refers to. Puting it in navbox itself would only make it point to navbox, not the template where navbox is being used in. —  Edokter  •  Talk  • 15:36, 29 February 2008 (UTC)


 * Out of curiosity, what does FULLPAGENAME do in the template source:
 * |name =
 * --— Gadget850 (Ed)  talk  -  20:10, 29 February 2008 (UTC)


 * Unless I'm mistaken, it allows the navbar to work correctly when viewing Navbox directly. — Dino guy  1000  20:36, 29 February 2008 (UTC)


 * Aha! I see how it works now.  Thanks.  --—  Gadget850 (Ed)  talk  -  21:05, 29 February 2008 (UTC)


 * Thanks from me as well for the above. Sardanaphalus (talk) 21:09, 29 February 2008 (UTC)

Sometimes compressed in Firefox
Does anyone else using Firefox have this problem: Sometimes (less than half of the time), the navbox will load with a "squished" or compressed appearance, where the height is only about 85-90% of what it is supposed to be. Simply reloading the page will fix it. It happens to me on multiple computers, and I only use Firefox so I do not know if other browsers do it. Has anyone else had this happen, and why does it happen? --Old Hoss (talk) 15:44, 29 February 2008 (UTC)


 * Never seen that yet (famous last words) but can you say whether it only occurs with templates that use e.g. groupstyles, liststyles, subgroups or some other common factor or factors...? Sardanaphalus (talk) 21:11, 29 February 2008 (UTC)


 * Nope, just any ol' navbox. I also noticed it, too, when I checked "Differences between versions", the part at the top where it shows in a green box and a yellow box the differences. Those boxes were squished together, maybe the "diff" boxes are a type of template being recalled, too? I just started noticing this in the last month or 2, with increasing occurrences the past few weeks. Like I said, it only happens maybe 30-40% of the time. The easiest way for me to recreate this situation is to just keep loading a navbox (it doesn't have to be transcluded) and after 20 or so, one will load funky (the cache should be cleared if you load the same one over and over), and if you reload it again, it will self-correct. Note, I don't know if this will happen on anything other than Firefox. Regards. --Old Hoss (talk) 21:31, 29 February 2008 (UTC)


 * Well, I've used Firefox nearly all the time for a while now (currently using 2.0.0.12) and can't recall seeing this kind of thing... Anyone else? ...Have you checked whether or not something unpleasant has managed to installed itself on your computer (or something like that)...? Sardanaphalus (talk) 01:40, 1 March 2008 (UTC)


 * I've never seen or heard of this problem before either, but would like to know more about it if it keeps happening. Old Hoss - could you try to get a screen shot of this problem if it happens to you again?  -CapitalR (talk) 05:47, 19 March 2008 (UTC)

Colour for every group
Is it possible to give every group its own colour? Kind regards, Tirkfl (talk) 19:54, 29 February 2008 (UTC)
 * Currently, that is not possible. — Edokter  •  Talk  • 19:56, 29 February 2008 (UTC)

Weird appearance
I'm getting a strange appearance for the Principal cities of Poland navbox in the article Katowice. It doesn't seem to have anything to do with that particular template (the same thing happens if I substitute other navboxes), nor with anything local in the article (the problem goes away when I edit and preview just the bottom section). Looks like something elsewhere in the article is messing it up. Any ideas?--Kotniski (talk) 23:16, 7 March 2008 (UTC)
 * Fixed. There was a stale wrapper floating in the article, that starts a floating table, but the remaning table code was removed. — Edokter  •  Talk  • 00:23, 8 March 2008 (UTC)
 * That's great, thanks :))--Kotniski (talk) 00:59, 8 March 2008 (UTC)

Help wanted
Hi folks, apologies if this is a stupid question but I'd rather ask here than spend hours trying to figure it out by myself.

The International Criminal Court navbox is set to autocollapse. How do I override this on the main International Criminal Court article so that it expands by default in that one article? (I'd also like to set the other navboxes in the article to collapse but for some reason the International criminal law box won't collapse for me.)

Thanks in advance, Sideshow Bob Roberts 04:34, 6 November 2007 (UTC)


 * Just add an empty "|state=" parameter (or fill in anything other then "autocollapse" or "collapsed") to the template. — Edokter  •  Talk  • 11:07, 6 November 2007 (UTC)


 * That doesn't always seem to work. Curiously it works sometimes, e.g. on the International Criminal Court page the last template, Supranationalism/World government topics, shows as collapsed, but not the International Criminal Law template, both same with the "|state=collapsed" switch. My actual problem though is to collapse Sufism on the Khwajagan page. __meco (talk) 02:57, 1 January 2008 (UTC)


 * International Criminal Law is not a navbox, just a table with navbox style. Sufism is a navbox, but has no state parameter set. Remember, state= must be set within the template; you cannot call it from the article (ie. will not work). —  Edokter  •  Talk  • 03:10, 1 January 2008 (UTC)


 * Ah, that is what I needed, and I also notice that that is what has been attempted in International Criminal Court. I would have thought that such an option would be useful. Could it be easily implemented? __meco (talk) 11:01, 1 January 2008 (UTC)


 * You could try puting the following line in the template:  Then you can pass the state parameter from the aricle. —  Edokter  •  Talk  • 18:44, 1 January 2008 (UTC)


 * didn't work. __meco (talk) 19:13, 1 January 2008 (UTC)


 * Forgot a "|" in front of the line in the template. Try again. — Edokter  •  Talk  • 20:11, 1 January 2008 (UTC)


 * Very good :-) __meco (talk) 13:00, 2 January 2008 (UTC)


 * Now I have a renewed issue. The template, a navbox, is Languages of South Asia, and the article where I am attempting to collapse an individual navbox is Sanskrit revival. __meco (talk) 16:55, 9 March 2008 (UTC)


 * I put an appropriate "state" line in the template - seems to work now. (Though personally I wouldn't normally collapse a navbox if it's the only one on the page.)--Kotniski (talk) 17:40, 9 March 2008 (UTC)


 * Perhaps normally not, but here the navbox items are not directly relevant (the article not being an entry), so I figured camouflaging that big ugly, open navbox a bit would be justified. __meco (talk) 18:11, 9 March 2008 (UTC)

Nowrap how-to guide
I first rough version of Line break handling is done. Its a how-to guide about how to handle word wraps (line breaks) at Wikipedia. Which very much applies to the dotted link lists we use in the navbox. Take a look and discuss this new how-to guide on its talk page.

Oh, and some of you might have noticed that sometimes the link lists in navboxes misbehave, such as wrapping in the wrong place or expanding outside their cell. The how-to guide explains when and why that happens, and how to fix it. (Actually, the wrapping problems with the link lists in navboxes is one of the main reasons I wrote that guide.)

--David Göthberg (talk) 21:52, 11 March 2008 (UTC)

Doc page broken
The last few edits to the doc page have made the documentation look terrible in my Internet Explorer 5.5 (on some older Windows versions we can not use newer IEs) and in Opera (I got a recent version of that one). The documentation only looks okay in Firefox now. Since you have broken it for Opera then you have probably broken it for many other browsers too, like Safari. I don't have the time to fix this but I wanted to point it out so you guys can take a look.

--David Göthberg (talk) 18:00, 12 March 2008 (UTC)


 * So I've noticed... I have reverted to the last known good version. — Edokter  •  Talk  • 18:23, 12 March 2008 (UTC)


 * That's interesting... it actually looked fine in IE 6 and 7, though I'm not crazy about some of the examples when using an 800x600 res. — Dino guy  1000  19:02, 12 March 2008 (UTC)


 * The only thing I saw in IE7 was that some of the examples were pushed to the right, which did look odd. This is because float: right; was added to the bodystyle.  FireFox does not seem to honor this.  --—  Gadget850 (Ed)  talk  -  19:28, 12 March 2008 (UTC)

Documentation Fault
Currently it says the options for state are "state  autocollapse, show, collapse  or  plain" This is incorrect, for the collasped state use collapsed (with a 'd' on the end) but not with collapse as that don't work. ChessCreator (talk) 23:44, 13 March 2008 (UTC)
 * Ignore that above!
 * state = collapsed works and is correctly given at the top of document. Later on it's on about 'other' I think and not tested that ChessCreator (talk) 23:57, 13 March 2008 (UTC)

Multiple lists within a group
Is it possible to have multiple lists within a group? Such as Group1, List1a, List1b..etc..? Flibirigit (talk) 18:25, 14 March 2008 (UTC)


 * No, but you can have subgroups using navbox group. — Edokter  •  Talk  • 19:04, 14 March 2008 (UTC)


 * Thanks.. how do I use navbox group with in navbox? Flibirigit (talk) 19:16, 14 March 2008 (UTC)


 * The same as in navbox itself, but "nested", ie.:

|group1 = grouptitle |list1 = |group2 = (etc...)
 * — Edokter  •  Talk  • 19:29, 14 March 2008 (UTC)

I'm having problems with the backgrounds. Could someone please look at User:Flibirigit/template. Thanks. Flibirigit (talk) 20:28, 14 March 2008 (UTC)


 * Small error on my part... I ment Navbox generic subgroup, not navbox group (which is ment for extra groups, not sub-groups). — Edokter  •  Talk  • 20:52, 14 March 2008 (UTC)

THANKS. Flibirigit (talk) 21:20, 14 March 2008 (UTC)

One example is Logic. --— Gadget850 (Ed)  talk  -  17:28, 15 March 2008 (UTC)

Not Showing the Navbox, Only Scripts
I decided to make a Wiki page for the Marines and have several navboxes on many of the pages. However none of my navboxes are showing. has a good example on it. Instead of showing the navboxes, it shows script. I have copied dozens of templates all relating to the navboxes I'm using, but it is still not showing. I am trying to make a wikipedia style site that is specific to the Corps but is using alreadhy created articles I've transfered over. If someone could take a look and tell me what template I am missing so I can finally get this straight. Thanks. Semper Fi. --Firehawkv8 (talk) 20:54, 15 March 2008 (UTC)


 * It seems your wiki has HTML disabled. Navbox uses straight HTML. — Edokter  •  Talk  • 20:59, 15 March 2008 (UTC)


 * This template uses Template:Navbox/core, so you will need to copy that over at a minimum. --— Gadget850 (Ed)  talk  -  21:03, 15 March 2008 (UTC)
 * Which you did copy over now that I am looking at the right template on your site. --—  Gadget850 (Ed)  talk  -  21:08, 15 March 2008 (UTC)


 * He has, otherwise there would be no HTML showing. He might also be missing some extensions. — Edokter  •  Talk  • 21:08, 15 March 2008 (UTC)

Complete Navbox rewrite
I recently re-wrote the entire Navbox to fix a number of known bugs, add lots of new features, and make it CSS skinnable. The new code can be found at User:CapitalR/Navbox, with a demonstration and explanation found at User:CapitalR/NavboxTest. There is also a version without the CSS (i.e. with the styles hard-coded) that can be found at User:CapitalR/NavboxNoCSS.

Both the new Navbox design and the new CSS design are fully backward compatible with existing code (well, one minor tweak to would have to be done, but that's easy enough).

The advantages of this design are as follows (copied from the explanation page):
 * Displays the exact same results in all browsers that I have tested (IE 7, Firefox, Safari, and Opera, all on Vista and XP; I still need to test IE 6 though)
 * Corrects a bug in IE where extra spaces are shown when the navbox is in the collapsed mode, and there are multiple groups/lists and an image.
 * Corrects differences in apparent font size between Firefox and IE.
 * Corrects differences in border padding between Firefox and IE (Firefox currently has a 4px interior border, IE has a 2px border; the new design uses a 3px border to compromise, plus, 3px looks better in my opinion).
 * Allows an unlimited number of lists/groups (see example below for demonstration)
 * Allows all groups/lists to be individually styled
 * Provides a parameter called "basestyle" that sets the style for the title, above, below, and group fields all at once. This is convenient for wanting to change the basic color of the navbox and not have to set all the style fields one at a time.
 * Creates groupoddstyle and groupevenstyle parameters, which are currently supported by but not by
 * Allows nested navboxes (see numerous examples below) for multiple show/hide boxes in a single container
 * Allows subgroups, which are just nested navboxes with the "border" parameter set to "subgroup". Now there is no need for a separate "Navbox subgroup" template; one just nests a new instance of "Navbox".
 * Post-expand size is very low, at only about 14kb for the basic box; on average, the post-expand is smaller than the current design, making the new one more efficient.
 * All parameters are optional and no display errors result from missing parameters (this includes optional title, and all lists/groups are optional)
 * Full support for CSS skinning

The new design requires that you put the following CSS into your personal monobook.css and then do a cache-clear refresh).

I'd like people to test out the new code, and give me comments on any bugs, additional features to be added, or suggested changes. I and hope we can get this code into the new Navbox soon. --CapitalR (talk) 10:18, 17 March 2008 (UTC)

Discussion

 * I think you and Dispenser should get together, as he also has been working on revamping it's code (though mainly on the CSS part). I'll offer myself as tester and can provide some administrative help, such as putting the CSS in common.css. I propose putting the new collaborative code into Template:Navbox new where we/you can work in piece and test all new functions and backward compatibility (especially on the v-d-e link font coloring, which I finally got working properly a while ago using some admittedly unsightly hacks). — Edokter  •  Talk  • 14:48, 17 March 2008 (UTC)
 * No excessive testing done, but my first impression: Great work, it looks good! –Fred Bradstadt (talk) 21:20, 17 March 2008 (UTC)
 * Can anyone test this on IE6 and let me know if everything looks okay? I've tested on just about every other browser, but don't have a computer capable of running IE6.  Thanks, --CapitalR (talk) 05:21, 19 March 2008 (UTC)
 * Oh, and a comment on the V-D-E color links...I just used the same code that you added to the current Navbox design, so there should be no ill effects in the V-D-E color department with the new design. --CapitalR (talk) 10:17, 19 March 2008 (UTC)
 * Looks good so far is IE6! Love the auto-padding with the 'plain' options, but that might cause a problem with narrow navboxes, where both the state and v-d-e links are left out due to little space. (That is why I once created pad.) The only other 'serious' issue I see is in the container tests, where the font size is too small within the nested navboxes; you'd need to compensate the font-size by 110%, but that is a known issue. Maybe a 'nest=yes' type parameter can do this automatically. — Edokter  •  Talk  • 11:48, 19 March 2008 (UTC)
 * Don't worry about the font-size in the container tests. If you look at the code for those particular tests, I manually set the font size to be smaller.  It defaults to just be the same size; users can shrink it a little like I did if they choose to.  Glad to hear that it's working well in IE6.  --CapitalR (talk) 12:44, 19 March 2008 (UTC)

(Undent) Ah I see... no problem there then. Let me see if I can loose the padding when both navbar and state are plain. — Edokter  •  Talk  • 13:16, 19 March 2008 (UTC)
 * Ah, that was a good call. I just fixed it.  I'm thinking I might make it possible to not have the padding too (perhaps "navbar=plain" will have no navbar but have padding, but "navbar=plainwithoutpadding" will have no navbar and no padding; the same would go for "state=plain" and "state=plainwithoutpadding"; we could come up with a better parameter value too than plainwithoutpadding, but you get the idea).  I'm not too worried about breaking templates that currently use the "navbar=plain" option, as only 33 currently do, and we can check them all by hand to ensure they're okay.  --CapitalR (talk) 05:08, 20 March 2008 (UTC)
 * Hmm, maybe you could reintroduce "off" for this purpose. — Edokter  •  Talk  • 13:16, 20 March 2008 (UTC)
 * Good idea, I just implemented that and added a few tests to check it. --CapitalR (talk) 23:16, 20 March 2008 (UTC)
 * Great! It works. This sprang another idea (might not be possible, it may be even completely useless... in which case just forget about it), but if 'plain' and 'off' are combined either way, is it possible to do insert the div on the plain side? — Edokter  •  Talk  • 23:35, 20 March 2008 (UTC)
 * Ok, that should be a little better. Now, "navbar/state=plain" puts padding, and "navbar/state=off" doesn't put padding, with one exception: when both "navbar=plain" and "state=plain" the double padding is removed (making it the same as "navbar=off" and "state=off"), as I could see no purpose for it being there.  We can just document that this is the case, and people can add their own padding if they really want to (though I highly doubt anyone would want to).  --CapitalR (talk) 06:48, 21 March 2008 (UTC)
 * That's exactly how I imagined it. Thank you. — Edokter  •  Talk  • 14:57, 21 March 2008 (UTC)