Template talk:Navbox/Archive 1

Tweaks for {Navigation} compatibility
My goal is to make this 100% compatible with Navigation so that this template can replace that one. The major reason is that a bug fix which repaired NavFrame behavior caused Navigation to be always initially closed. So we need to implement category:

Please change: to: |l1 = Thank you. &larr;BenB4 15:51, 19 August 2007 (UTC)
 * l1 =
 * [[Image:Yes check.svg|20px]] Done. Cheers. --MZMcBride 15:54, 19 August 2007 (UTC)

Class nowraplinks
I have made a template and some CSS code that prevents word wraps inside links and only allows word wraps between the links and in normal text. This is useful for instance for long link lists.

The nowraplinks template has now been fully deployed and the CSS code added to common.css. I and other editors have tested it in several ways in several browsers. There for I suggest that the CSS class is used here (in Template:Navbox) to save users of this navigation box from using lots and lots of &amp;nbsp; or nowrap. I have tested it with the template's current code in my own testpages/sandboxes.

I suggest that the first line of Template:Navbox/core should be changed to:

to trick MediaWiki into accepting a pipe as parameter. I am not sure that would work in your case.


 * Anyway, I took a look at your Template:Compression Formats and actually, we have a way better solution for you! Take a look at Template:Navbox generic subgroup, it is especially designed for cases like yours. I think you will like that one. (If you have any problems using it, just tell me and I can edit your navbox for you.)


 * Cheers! --David Göthberg 18:46, 8 September 2007 (UTC)


 * Awesome! I'll have a look into this. Many thanks. Chris Cunningham 11:35, 9 September 2007 (UTC)

Colorizing VDE links
There has been a move (which I approve of) to convert existing templates to use Navbox, which has nicely implemented the collapsible templates on many pages. However, this has broken custom colorization of VDE links in the title bars of many templates. For those templates using dark backgrounds in the title bar (which includes many university athletic teams, which are using school colors), the VDE links can now be nearly impossible to see. (See Template:AuburnBasketballCoach and Template:CaliforniaBasketballCoach for examples.) The title itself and the show/hide links take on the custom color, so it would be great if the VDE links could as well. Is this possible? Thanks. WildCowboy 08:55, 14 September 2007 (UTC)
 * Yup, it's possible, and has already been done on test versions for the next upgrade. It will be done when the new changes to the Navbox go through. --CapitalR 16:56, 14 September 2007 (UTC)
 * Great...thanks! Looking forward to seeing it implemented. WildCowboy 18:13, 14 September 2007 (UTC)

Wrapping
I have noticed that when a link clicked on in a template, and it no longer appears as a link but as bold text, the nowrap no longer works. See:, click on Van Buren, my screen resolution setting is 1024px X 768px using FireFox. When Van Buren is the active page, the name wraps to the next line. This is an extremely minor nit-picky point, but if you can fix it go for it. Otherwise, forgetaboutit. Regards.--Old Hoss 21:17, 21 September 2007 (UTC)


 * Ah. Because the no-wrap css applies to links only. Not sure how to fix that.  Hmm.  Smarter people here so I pass. &larr;Ben B4  21:47, 21 September 2007 (UTC)
 * On second thought, the purpose of navboxes is to leave to other related articles, so I'm not sure if this is a big enough deal to spend a lot of time on. &larr;Ben B4 21:49, 21 September 2007 (UTC)

Problem
There's a problem with Fourth Balkenende cabinet, at least in Firefox. Some of the text appears outside of the box. Anyone know what's going on and how to fix that? JACO PLANE  &bull; 2007-09-24 09:23


 * It's because of the long lines of nowrapped text. That template needs tidied anyway, so let's see if we can kill two birds with one stone. Chris Cunningham 09:39, 24 September 2007 (UTC)


 * Alas, it's going to require a rethink of the template layout. But there template's a little tidier than it was, anyway. Chris Cunningham 09:47, 24 September 2007 (UTC)


 * I did a quick (and not the best way to do it) edit using although the nav box still needs to be cleaned up. Peachey88 02:14, 26 September 2007 (UTC)

Tagging templates that need to change
Say if we find a template that needs to be changed but we don't have the expertize or time to change it, is there a way we can tag it (eg: a category)? Peachey88 07:28, 26 September 2007 (UTC)


 * If by "change" you mean "tidy and cleanup", there's Category:Wikipedia template cleanup. Chris Cunningham 13:45, 26 September 2007 (UTC)

Tutorial
Anyone know where I can find a tutorial on how to create a navbox for my own site? Thanks Travb (talk) 08:49, 27 September 2007 (UTC)


 * Unless your site is running the Mediawiki software, it's not something which is transferable from here. If you're running MediaWiki, the best place to start is Help:Templates, which gives an overview of the syntax. Chris Cunningham 09:07, 27 September 2007 (UTC)

Categories (discussion and non-inclusion)
Firstly, the main page documentation doesn't mention the   attribute, which can be used to add cats to transcluded pages.

Secondly, these should be d from the category itself. See Template: Games Workshop, which transcludes Category: Games Workshop onto pages which include it but avoids being part of that category itself. I'd rather this were automatic with the attribute, because templates shouldn't be getting tagged with article namespace cats.

Chris Cunningham 12:49, 27 September 2007 (UTC)
 * The category attribute is basically useless and should never be used (which is why it's undocumented). It is only included for backward computability; cases where it is used should slowly be removed and phased out.  On any sub-template that wants to use the category parameter, just add the categories after the Navbox call instead.  For example:

The two above calls do exactly the same thing, so there's really no point in using a category parameter in my opinion. It just makes the template more complicated to understand without adding any use. It's easier to just add the categories at the end after the Navbox call instead of inside of it. Unfortunately, we can't just add the includeonly tags to this main Navbox template, as it would screw up lots of templates that are (unfortunately) using the category parameter. I'm going to remove the editprotected tag for now until more discussion follows. --CapitalR 08:20, 30 September 2007 (UTC)

Reduce gap between lines that wrap around?
Hi &mdash; I was wondering if anyone else felt that the gaps between lines that wrap around were a little too wide? When I view the following, for example, the bottom line of list1 looks nearer to the top of line of list2 rather than to the preceding line in list1; note also the line-spacing of the "Quite-a-long group title":

Can the line-spacing in this template be modified to reduce this gap? Thanks, Sardanaphalus 00:59, 28 September 2007 (UTC)


 * Haha i know. there needs an "enter", line break before in template code. Before all list1, list2... an enter is necessary to reduce line gap between lines of same list. I can show using an example. Or you see 2 revisions (  and  )to see difference.
 * editprotected
 * Give a linebreak before (here) . and all list2 list3 etc. not br/, but hit enter key before all list1, list2 transclusion. Lara_bran 06:27, 28 September 2007 (UTC)


 * Sorry by now it is moved to navbox/core. So it should be l2 l3 instead of list1 list2. in core template. But please compare 2 revisions i gave as example. thanks.Lara_bran 06:35, 28 September 2007 (UTC)

blah· blah· blah [etc] In other words, not just using a line-break before the list, but making it a  as well. Do you think people would be happy to have this formatting included in the Navbox/core code? Best wishes, Sardanaphalus 13:07, 29 September 2007 (UTC)
 * Thank you, Lara_bran. After some experimenting, I found the following seemed to work:
 * list1 =
 * Including the divs in the core is something I've thought a lot about, and I lean toward not including it, as it makes the navbox list heights higher, making it look funny. Compare:

The first example is how the code works now. The second example above has the divs for all lists/above/below (which is what was suggested as an edit protected in ), and you can see how much taller the lists/groups/above/below become, making it look quite weird. I think we should just leave it as is for now until more testing can be done to figure out if we can get around this problem. Also, I'm fairly certain that many templates will get messed up by adding the breaks before/after each list or adding div containers around each list, so we can't make the change yet without more testing. --CapitalR 08:26, 30 September 2007 (UTC)


 * Ok, so I did some testing and it looks like the way to do this will be to put in code like this:

I'll do more testing and try to estimate the unintended side effects of adding this to the Navbox/core code. --CapitalR 09:03, 30 September 2007 (UTC)


 * Ok, so I've done some more tests on this, and I think it might be possible eventually include the divs automatically, but it cannot be done immediately or it will mess up many instances of this template. I'm working on a new version of the template (you can try it out at User:CapitalR/Test1, don't forget to add the new CSS to your monobook as instructed).  I added the divs to the new version and it seems to work ok, but there's some unfortunate formatting differences between Firefox and IE that I'm trying to work out.  I'll keep people posted on how the tests go.  --CapitalR 18:17, 30 September 2007 (UTC)
 * Did anybody see 2 revisions and diff i gave as example? including div takes lot of work, like compatibility with mozilla/ie etc. My solution is just hitting enter before every list. Lara_bran 03:57, 1 October 2007 (UTC)
 * Yeah, pressing enter before every list has the same side effects though as adding the divs. I've tested this thoroughly and am working on a solution now (check my edit history for all the edits to test pages in my userspace).  --CapitalR 04:20, 1 October 2007 (UTC)