![]() | This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Hi. I have my own Wiki system, using the MediaWiki software. Unfortunatelly this software doesn't come with any templates. I find this particular template very handy, and would like to use it on my Wiki as well. Though when I copy the source code, I get nothing but plain text. I think I miss some other templates used on this one.
Can someone please tell me what other templates I need to copy to my own Wiki, or if anyone has another idea of get this template working on my site, is someone willing to help me with that? Thanks very much in advance :-) -
Jort227 16:03, 27 July 2007 (UTC)
I've noticed a few more common problems with use of this template and have made changes to correct them. The change is to put each of the {{{list_n}}} calls onto its own line to prevent incorrect spacing / newline errors in some browsers. This has always been a problem with this template (i.e., it's not a new problem introduced by my last edits) and should be fixed by this edit.
The code should be completely replaced with the following:
<table class="navbox collapsible {{{state|autocollapse}}}" style="margin:auto; {{{style|}}}{{{bodystyle|}}}"> <tr><!-- ---Titlebar--- --><th colspan="{{#if:{{{image|}}}|3|2}}" style="text-align:center;width:100%;{{{titlestyle|}}}"><!-- --><div style="float:left; width:6em; text-align:left;">{{#switch:{{{navbar|}}} |plain= |#default={{Tnavbar|{{{name<noinclude>|Navbox generic</noinclude>}}} |mini=1}}}}</div><span style="font-size:110%;">{{{title}}}</span></th> </tr><!-- ---Above (optional)--- -->{{#if:{{{above|}}} |<tr><td style="{{{abovestyle|}}}" colspan="{{#if:{{{image|}}}|3|2}}"> {{{above|}}} </td></tr>}}<!-- ---Groups--- -->{{#if:{{{list1|}}}|<tr>{{#if:{{{group1|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group1}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group1|}}}|1|2}}"> {{{list1}}} </td><!-- -->{{#if:{{{image|}}}|<td rowspan="{{#expr: {{#if:{{{list1|}}}|1|0}} +{{#if:{{{list2|}}}|1|0}} +{{#if:{{{list3|}}}|1|0}} +{{#if:{{{list4|}}}|1|0}} +{{#if:{{{list5|}}}|1|0}} +{{#if:{{{list6|}}}|1|0}} +{{#if:{{{list7|}}}|1|0}} +{{#if:{{{list8|}}}|1|0}} +{{#if:{{{list9|}}}|1|0}} +{{#if:{{{list10|}}}|1|0}} +{{#if:{{{list11|}}}|1|0}} +{{#if:{{{list12|}}}|1|0}} +{{#if:{{{list13|}}}|1|0}} +{{#if:{{{list14|}}}|1|0}} +{{#if:{{{list15|}}}|1|0}} +{{#if:{{{list16|}}}|1|0}} +{{#if:{{{list17|}}}|1|0}} +{{#if:{{{list18|}}}|1|0}} +{{#if:{{{list19|}}}|1|0}} +{{#if:{{{list20|}}}|1|0}}}}" <!-- -->style="vertical-align:middle;padding-left:7px; width:0%;{{{imagestyle|}}}"> {{{image}}} </td>}}</tr>}}<!-- -->{{#if:{{{list2|}}}|<tr>{{#if:{{{group2|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group2}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group2|}}}|1|2}}"> {{{list2}}} </td></tr>}}<!-- -->{{#if:{{{list3|}}}|<tr>{{#if:{{{group3|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group3}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group3|}}}|1|2}}"> {{{list3}}} </td></tr>}}<!-- -->{{#if:{{{list4|}}}|<tr>{{#if:{{{group4|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group4}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group4|}}}|1|2}}"> {{{list4}}} </td></tr>}}<!-- -->{{#if:{{{list5|}}}|<tr>{{#if:{{{group5|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group5}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group5|}}}|1|2}}"> {{{list5}}} </td></tr>}}<!-- -->{{#if:{{{list6|}}}|<tr>{{#if:{{{group6|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group6}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group6|}}}|1|2}}"> {{{list6}}} </td></tr>}}<!-- -->{{#if:{{{list7|}}}|<tr>{{#if:{{{group7|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group7}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group7|}}}|1|2}}"> {{{list7}}} </td></tr>}}<!-- -->{{#if:{{{list8|}}}|<tr>{{#if:{{{group8|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group8}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group8|}}}|1|2}}"> {{{list8}}} </td></tr>}}<!-- -->{{#if:{{{list9|}}}|<tr>{{#if:{{{group9|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group9}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group9|}}}|1|2}}"> {{{list9}}} </td></tr>}}<!-- -->{{#if:{{{list10|}}}|<tr>{{#if:{{{group10|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group10}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group10|}}}|1|2}}"> {{{list10}}} </td></tr>}}<!-- -->{{#if:{{{list11|}}}|<tr>{{#if:{{{group11|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group11}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group11|}}}|1|2}}"> {{{list11}}} </td></tr>}}<!-- -->{{#if:{{{list12|}}}|<tr>{{#if:{{{group12|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group12}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group12|}}}|1|2}}"> {{{list12}}} </td></tr>}}<!-- -->{{#if:{{{list13|}}}|<tr>{{#if:{{{group13|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group13}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group13|}}}|1|2}}"> {{{list13}}} </td></tr>}}<!-- -->{{#if:{{{list14|}}}|<tr>{{#if:{{{group14|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group14}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group14|}}}|1|2}}"> {{{list14}}} </td></tr>}}<!-- -->{{#if:{{{list15|}}}|<tr>{{#if:{{{group15|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group15}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group15|}}}|1|2}}"> {{{list15}}} </td></tr>}}<!-- -->{{#if:{{{list16|}}}|<tr>{{#if:{{{group16|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group16}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group16|}}}|1|2}}"> {{{list16}}} </td></tr>}}<!-- -->{{#if:{{{list17|}}}|<tr>{{#if:{{{group17|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group17}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group17|}}}|1|2}}"> {{{list17}}} </td></tr>}}<!-- -->{{#if:{{{list18|}}}|<tr>{{#if:{{{group18|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group18}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group18|}}}|1|2}}"> {{{list18}}} </td></tr>}}<!-- -->{{#if:{{{list19|}}}|<tr>{{#if:{{{group19|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group19}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group19|}}}|1|2}}"> {{{list19}}} </td></tr>}}<!-- -->{{#if:{{{list20|}}}|<tr>{{#if:{{{group20|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group20}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group20|}}}|1|2}}"> {{{list20}}} </td></tr>}}<!-- ---Below (optional)--- -->{{#if:{{{below|}}}|<tr><td style="{{{belowstyle|}}}" colspan="{{#if:{{{image|}}}|3|2}}"> {{{below|}}} </td></tr>}}<!-- --></table><noinclude>{{{{FULLPAGENAME}}/doc}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude>
Thanks, and once again this is implemented at User:CapitalR/Test with test cases visible at CapitalR/Test3. Also, click here for the diff. Note that the general style of the template is remaining the same; only spacing/new-line errors are being corrected. -- CapitalR
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
Notice that the first and last items in the list are messed up (all should be on one line). Currently, the only way to fix this is as follows:
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} <!-- -->Item2 {{!}} <!-- -->Item3 {{!}} <!-- -->Item4 }}
or
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
The new changes will do the following:
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
{{ USLargestCities}} {{USLargestMetros}}
{{ USLargestCities}} {{USLargestMetros}}
Lots of editors like to put each item in a list on a newline to make the list easier to read (especially long lists with long wikilinks). Adding these extra line breaks to this master template will make it less confusing for editors who get those strange newline problems in child templates. I find it annoying to keep having to fix other editors mistakes by either removing the line breaks or adding the html comments around the line breaks in child templates, both of which make the child template code harder to read. This simple fix will improve working with this template and help avoid these errors for less experienced editors. I know that it will take up some server time to apply the changes, but it is well worth it. -- CapitalR 18:18, 13 August 2007 (UTC)
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = <div> Item1{{·}} Item2{{·}} Item3{{·}} Item4 </div> }}
Hey guys. I have been noticing that the category field in Template:Big 12 Football Venues, Template:SEC Baseball Venues, etc. (all the similar ones) are not including the category field for some odd reason for the Navbox generic. For instance, I was about to change the one for Template:Big 12 Basketball Venues to a Navbox generic so that it had the v/d/e controls and the division (North and South) could be separated like for Template:Big 12 Football Venues (among others), and I noticed that it was indeed working for that one. The reason the category is important is so it displays the category down at the bottom of all pages where it is (in this case the Big 12 Conference category). The noinclude ones still work, but not the regular category. Is this a fixable problem (am I doing something wrong?) or is just a flaw with the design of the Navbox generic? Any help is appreciated. ( Cardsplayer4life 16:27, 16 August 2007 (UTC))
In my opinion, the category parameters in nav boxes are a very bad idea. You can still do what you want without any changes to the template being necessary. All you need to do is add the following after the code for the Navbox generic and it will work:
<includeonly>[[Category:Big 12 Conference]]</includeonly>
This has the effect of adding every page that uses the template to the category, but not the template itself. I modified {{ Big 12 Football Venues}} as an example for you. Hope that solves your problems. -- CapitalR 13:13, 17 August 2007 (UTC)
When the template is set to auto width the width shrinks significantly when the template is hidden. Can this behavior be changed so that the width stays the same whether the template is hidden or not? Paul C/ T + 14:37, 31 May 2007 (UTC)
{{
editprotected}}
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 generic) to save users of this navigation box from using lots and lots of or {{ nowrap}}. I have tested it with the template's current code in my own testpages/sandboxes.
I suggest that the first half of the first line should be changed to:
<table class="navbox collapsible {{{state|autocollapse}}} nowraplinks"
While I am at it I suggest that the last few lines be changed to:
--></table><noinclude> {{pp-template|small=yes}} {{template doc}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
The change of the last few lines is to get the documentation look and feel recommended in Wikipedia:Template documentation. The two empty lines between the "pp-template" and the "template doc" is to prevent the documentation to come too close to the template, just to make the template page more readable.
-- David Göthberg 20:13, 19 August 2007 (UTC)
{{
editprotected}}
Take a look at {{ USLegislatures}} in IE and in Firefox. Both have problems associated with the nowraplinks modification to Navbox generic. In IE, it causes wrapping to occur before a right parenthesis and/or after a left parenthesis, which didn't happen before (and shouldn't happen). In Firefox, it causes the text to go outside of the box and off the screen, causing a scrollbar to appear sometimes. I like the nowraplinks addition, but perhaps we can find a way to correct this (I think I'll fix this template in particular with regular {{ nowrap}} additions, but there are probably other templates out there with this problem too). -- CapitalR 23:53, 21 August 2007 (UTC)
![]() | This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Hi. I have my own Wiki system, using the MediaWiki software. Unfortunatelly this software doesn't come with any templates. I find this particular template very handy, and would like to use it on my Wiki as well. Though when I copy the source code, I get nothing but plain text. I think I miss some other templates used on this one.
Can someone please tell me what other templates I need to copy to my own Wiki, or if anyone has another idea of get this template working on my site, is someone willing to help me with that? Thanks very much in advance :-) -
Jort227 16:03, 27 July 2007 (UTC)
I've noticed a few more common problems with use of this template and have made changes to correct them. The change is to put each of the {{{list_n}}} calls onto its own line to prevent incorrect spacing / newline errors in some browsers. This has always been a problem with this template (i.e., it's not a new problem introduced by my last edits) and should be fixed by this edit.
The code should be completely replaced with the following:
<table class="navbox collapsible {{{state|autocollapse}}}" style="margin:auto; {{{style|}}}{{{bodystyle|}}}"> <tr><!-- ---Titlebar--- --><th colspan="{{#if:{{{image|}}}|3|2}}" style="text-align:center;width:100%;{{{titlestyle|}}}"><!-- --><div style="float:left; width:6em; text-align:left;">{{#switch:{{{navbar|}}} |plain= |#default={{Tnavbar|{{{name<noinclude>|Navbox generic</noinclude>}}} |mini=1}}}}</div><span style="font-size:110%;">{{{title}}}</span></th> </tr><!-- ---Above (optional)--- -->{{#if:{{{above|}}} |<tr><td style="{{{abovestyle|}}}" colspan="{{#if:{{{image|}}}|3|2}}"> {{{above|}}} </td></tr>}}<!-- ---Groups--- -->{{#if:{{{list1|}}}|<tr>{{#if:{{{group1|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group1}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group1|}}}|1|2}}"> {{{list1}}} </td><!-- -->{{#if:{{{image|}}}|<td rowspan="{{#expr: {{#if:{{{list1|}}}|1|0}} +{{#if:{{{list2|}}}|1|0}} +{{#if:{{{list3|}}}|1|0}} +{{#if:{{{list4|}}}|1|0}} +{{#if:{{{list5|}}}|1|0}} +{{#if:{{{list6|}}}|1|0}} +{{#if:{{{list7|}}}|1|0}} +{{#if:{{{list8|}}}|1|0}} +{{#if:{{{list9|}}}|1|0}} +{{#if:{{{list10|}}}|1|0}} +{{#if:{{{list11|}}}|1|0}} +{{#if:{{{list12|}}}|1|0}} +{{#if:{{{list13|}}}|1|0}} +{{#if:{{{list14|}}}|1|0}} +{{#if:{{{list15|}}}|1|0}} +{{#if:{{{list16|}}}|1|0}} +{{#if:{{{list17|}}}|1|0}} +{{#if:{{{list18|}}}|1|0}} +{{#if:{{{list19|}}}|1|0}} +{{#if:{{{list20|}}}|1|0}}}}" <!-- -->style="vertical-align:middle;padding-left:7px; width:0%;{{{imagestyle|}}}"> {{{image}}} </td>}}</tr>}}<!-- -->{{#if:{{{list2|}}}|<tr>{{#if:{{{group2|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group2}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group2|}}}|1|2}}"> {{{list2}}} </td></tr>}}<!-- -->{{#if:{{{list3|}}}|<tr>{{#if:{{{group3|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group3}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group3|}}}|1|2}}"> {{{list3}}} </td></tr>}}<!-- -->{{#if:{{{list4|}}}|<tr>{{#if:{{{group4|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group4}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group4|}}}|1|2}}"> {{{list4}}} </td></tr>}}<!-- -->{{#if:{{{list5|}}}|<tr>{{#if:{{{group5|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group5}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group5|}}}|1|2}}"> {{{list5}}} </td></tr>}}<!-- -->{{#if:{{{list6|}}}|<tr>{{#if:{{{group6|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group6}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group6|}}}|1|2}}"> {{{list6}}} </td></tr>}}<!-- -->{{#if:{{{list7|}}}|<tr>{{#if:{{{group7|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group7}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group7|}}}|1|2}}"> {{{list7}}} </td></tr>}}<!-- -->{{#if:{{{list8|}}}|<tr>{{#if:{{{group8|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group8}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group8|}}}|1|2}}"> {{{list8}}} </td></tr>}}<!-- -->{{#if:{{{list9|}}}|<tr>{{#if:{{{group9|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group9}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group9|}}}|1|2}}"> {{{list9}}} </td></tr>}}<!-- -->{{#if:{{{list10|}}}|<tr>{{#if:{{{group10|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group10}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group10|}}}|1|2}}"> {{{list10}}} </td></tr>}}<!-- -->{{#if:{{{list11|}}}|<tr>{{#if:{{{group11|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group11}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group11|}}}|1|2}}"> {{{list11}}} </td></tr>}}<!-- -->{{#if:{{{list12|}}}|<tr>{{#if:{{{group12|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group12}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group12|}}}|1|2}}"> {{{list12}}} </td></tr>}}<!-- -->{{#if:{{{list13|}}}|<tr>{{#if:{{{group13|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group13}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group13|}}}|1|2}}"> {{{list13}}} </td></tr>}}<!-- -->{{#if:{{{list14|}}}|<tr>{{#if:{{{group14|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group14}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group14|}}}|1|2}}"> {{{list14}}} </td></tr>}}<!-- -->{{#if:{{{list15|}}}|<tr>{{#if:{{{group15|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group15}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group15|}}}|1|2}}"> {{{list15}}} </td></tr>}}<!-- -->{{#if:{{{list16|}}}|<tr>{{#if:{{{group16|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group16}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group16|}}}|1|2}}"> {{{list16}}} </td></tr>}}<!-- -->{{#if:{{{list17|}}}|<tr>{{#if:{{{group17|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group17}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group17|}}}|1|2}}"> {{{list17}}} </td></tr>}}<!-- -->{{#if:{{{list18|}}}|<tr>{{#if:{{{group18|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group18}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group18|}}}|1|2}}"> {{{list18}}} </td></tr>}}<!-- -->{{#if:{{{list19|}}}|<tr>{{#if:{{{group19|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group19}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{oddstyle|}}}" colspan="{{#if:{{{group19|}}}|1|2}}"> {{{list19}}} </td></tr>}}<!-- -->{{#if:{{{list20|}}}|<tr>{{#if:{{{group20|}}}|<th style="white-space:nowrap;{{{groupstyle|}}}">{{{group20}}}</th>}} <td style="width:100%;{{{liststyle|}}}{{{evenstyle|}}}" colspan="{{#if:{{{group20|}}}|1|2}}"> {{{list20}}} </td></tr>}}<!-- ---Below (optional)--- -->{{#if:{{{below|}}}|<tr><td style="{{{belowstyle|}}}" colspan="{{#if:{{{image|}}}|3|2}}"> {{{below|}}} </td></tr>}}<!-- --></table><noinclude>{{{{FULLPAGENAME}}/doc}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude>
Thanks, and once again this is implemented at User:CapitalR/Test with test cases visible at CapitalR/Test3. Also, click here for the diff. Note that the general style of the template is remaining the same; only spacing/new-line errors are being corrected. -- CapitalR
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
Notice that the first and last items in the list are messed up (all should be on one line). Currently, the only way to fix this is as follows:
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} <!-- -->Item2 {{!}} <!-- -->Item3 {{!}} <!-- -->Item4 }}
or
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
The new changes will do the following:
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = Item1 {{!}} Item2 {{!}} Item3 {{!}} Item4 }}
{{ USLargestCities}} {{USLargestMetros}}
{{ USLargestCities}} {{USLargestMetros}}
Lots of editors like to put each item in a list on a newline to make the list easier to read (especially long lists with long wikilinks). Adding these extra line breaks to this master template will make it less confusing for editors who get those strange newline problems in child templates. I find it annoying to keep having to fix other editors mistakes by either removing the line breaks or adding the html comments around the line breaks in child templates, both of which make the child template code harder to read. This simple fix will improve working with this template and help avoid these errors for less experienced editors. I know that it will take up some server time to apply the changes, but it is well worth it. -- CapitalR 18:18, 13 August 2007 (UTC)
{{Navbox generic |title = Title |state=uncollapsed |name=Navbox generic |list1 = <div> Item1{{·}} Item2{{·}} Item3{{·}} Item4 </div> }}
Hey guys. I have been noticing that the category field in Template:Big 12 Football Venues, Template:SEC Baseball Venues, etc. (all the similar ones) are not including the category field for some odd reason for the Navbox generic. For instance, I was about to change the one for Template:Big 12 Basketball Venues to a Navbox generic so that it had the v/d/e controls and the division (North and South) could be separated like for Template:Big 12 Football Venues (among others), and I noticed that it was indeed working for that one. The reason the category is important is so it displays the category down at the bottom of all pages where it is (in this case the Big 12 Conference category). The noinclude ones still work, but not the regular category. Is this a fixable problem (am I doing something wrong?) or is just a flaw with the design of the Navbox generic? Any help is appreciated. ( Cardsplayer4life 16:27, 16 August 2007 (UTC))
In my opinion, the category parameters in nav boxes are a very bad idea. You can still do what you want without any changes to the template being necessary. All you need to do is add the following after the code for the Navbox generic and it will work:
<includeonly>[[Category:Big 12 Conference]]</includeonly>
This has the effect of adding every page that uses the template to the category, but not the template itself. I modified {{ Big 12 Football Venues}} as an example for you. Hope that solves your problems. -- CapitalR 13:13, 17 August 2007 (UTC)
When the template is set to auto width the width shrinks significantly when the template is hidden. Can this behavior be changed so that the width stays the same whether the template is hidden or not? Paul C/ T + 14:37, 31 May 2007 (UTC)
{{
editprotected}}
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 generic) to save users of this navigation box from using lots and lots of or {{ nowrap}}. I have tested it with the template's current code in my own testpages/sandboxes.
I suggest that the first half of the first line should be changed to:
<table class="navbox collapsible {{{state|autocollapse}}} nowraplinks"
While I am at it I suggest that the last few lines be changed to:
--></table><noinclude> {{pp-template|small=yes}} {{template doc}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
The change of the last few lines is to get the documentation look and feel recommended in Wikipedia:Template documentation. The two empty lines between the "pp-template" and the "template doc" is to prevent the documentation to come too close to the template, just to make the template page more readable.
-- David Göthberg 20:13, 19 August 2007 (UTC)
{{
editprotected}}
Take a look at {{ USLegislatures}} in IE and in Firefox. Both have problems associated with the nowraplinks modification to Navbox generic. In IE, it causes wrapping to occur before a right parenthesis and/or after a left parenthesis, which didn't happen before (and shouldn't happen). In Firefox, it causes the text to go outside of the box and off the screen, causing a scrollbar to appear sometimes. I like the nowraplinks addition, but perhaps we can find a way to correct this (I think I'll fix this template in particular with regular {{ nowrap}} additions, but there are probably other templates out there with this problem too). -- CapitalR 23:53, 21 August 2007 (UTC)