This 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. |
Archive 15 | ← | Archive 20 | Archive 21 | Archive 22 | Archive 23 | Archive 24 |
There was a change made a number of years ago to line-break handling either as part of the Common CSS and / or somewhere else. I'm not sure if it was done intentionally or if it was overlooked, but as a result of these changes wrapping is not currently being handled correctly within many {{ navbox}}es when they use {{ hlist}}. See these examples of one section of the {{ Wikipedia technical help}} template and note how the bullets between each item can sometimes start a newline when changing the width of the page, which is not desired:
Examples
|
---|
{{Navbox | title = [[Help:Directory#Technical help|Wikipedia technical help]] | listclass = hlist | state = {{{state<includeonly>|{{{1|autocollapse}}}</includeonly>}}} | basestyle = text-align: center; | name = Wikipedia technical help | bodyclass=hlist | above = '''Get personal technical help at [[Wikipedia:Teahouse|the Teahouse]], [[Wikipedia:Help desk|Help desk]], [[Wikipedia:Village pump (technical)|Village pump (technical)]], [[Help:Introduction to talk pages/1|talk pages]] or [[Wikipedia:IRC|IRC]].''' | group3 = [[Wikitext]] | list3 = {{nowrap begin}}[[Help:Wikitext|Wikitext main page]] ([[Help:Cheatsheet|Cheatsheet]]){{·w}} [[Help:Using colours|Colours use]]{{·w}} [[Help:Columns|Column]]s{{·w}} [[Wikipedia:Line-break handling|Line-break handling]]{{·w}} [[Help:List|Lists]]{{·w}} [[Help:Magic words|Magic words]] ([[Help:Magic words for beginners|For beginners]]{{·w}} [[Help:Conditional expressions|Conditional expressions]]{{·w}} [[Help:Switch parser function|Switch parser function]]{{·w}} [[Help:Time function|Time function]]){{·w}} [[Help:Redirect|Redirects]]{{·w}} [[Help:Section|Sections and TOCs]]{{·w}} [[Help:Table|Tables]] ([[Help:Introduction to tables with Wiki Markup/1|Introduction]]{{·w}} [[Help:Basic table markup|Basics]]{{·w}} [[Help:Conditional tables|Conditional tables]]{{·w}} [[Help:Sorting|Sorting]]{{·w}} [[Help:Collapsing|Collapsing]]{{·w}} [[Wikipedia:Advanced table formatting|Advanced table formatting]]){{nowrap end}} | below = {{nowrap begin}}'''See also: [[:Category:Wikipedia information pages]]'''{{·w}} '''[[:Category:Wikipedia how-to]]'''<br>Further navigation at: [[Template:Wikipedia help pages|Help pages]] ([[Template:Administrators' guide|Administrators]]){{·w}} [[Template:Wikipedia template messages|Templates]]{{·w}} [[Template:Wikipedia referencing|Referencing]] ([[Template:Citation metadata navbox|Citation metadata]]){{·w}} [[Wikipedia:WikiProject Accessibility/Navigation menu|Accessibility]]{{·w}} [[Template:Botnav|Bots]]{{·w}} [[Wikipedia:User scripts/Navbox|User scripts]]{{·w}} [[Template:Wikipedia accounts|Accounts]]{{nowrap end}} }} |
My (very limited) understanding of why this was done is that it had something to do with IE not rendering the line breaks properly with the old system. I realize this will need to be a larger discussion and for all I know that discussion could have already happened, but I don't know if or when as I haven't been as active on Wikipedia in the last 10 years or so. I would appreciate it if someone could point me in the right direction to read more about this. If it hasn't been properly discussed, where would be the best place to raise this issue? I see in the deletion discussion for {{ ·wrap}} that this issue was brought up but then quickly dismissed. Was it working properly back then and then has subsequently regressed?
Thanks so much for pointing me in the right direction. - Paul T +/ C 21:15, 7 March 2018 (UTC)
In the {{{image}}}
parameter, I have specified my image the same way I did on another page. And if I put the same image below the Navbox, it also shows up. I also have a {{{list1}}}
. Any ideas why the image is not showing?
Lithimlin (
talk) 19:09, 17 April 2018 (UTC)
Hello there. I have been editing and creating Navboxes and Sidebars for a while, and I have a sense for when is better to use each. However, I was wondering if more spelled-out guidelines, or essays on the topic exist. If no guidance exists, I am not suggesting that it should; not everything needs to be spelled out. However, if it does exist, I would be interested to know and read it. One final note: THANK YOU to whoever established and developed them in Wikipedia. They are invaluable in finding articles and bringing order and structure to Wikipedia. Thank you!( talk) user:Al83tito 16:20, 6 July 2018 (UTC)
Module:Team roster navbox is a wrapper for
Module:Navbox that does two extra things (1) adds |nowraplinks=yes
and (2) automatically applies background/color styling to the title, above, group, and below fields. the first feature is trivial, but the second feature is rather useful. for example, compare
{{team roster navbox | name = Template talk:Navbox | title = [[Template:Navbox]] | titlestyle = background-color:black; color:white; }}
and
{{navbox | name = Template talk:Navbox | title = [[Template:Navbox]] | titlestyle = background-color:black; color:white; }}
if there are no objections, I would like to add this link coloring feature to
Module:Navbox directly. it would be turned on using |stylelinks=yes
parameter, which means "apply the parent element background and color style parameter to the text inside the links". comments? suggestions?
Frietjes (
talk) 19:11, 9 July 2018 (UTC)
Followers of this page may be interested in WT:TemplateStyles#In the context of meta templates. Please take a moment to comment there. -- Izno ( talk) 01:38, 27 July 2018 (UTC)
Not sure if this is a flaw... I noted that
Module:Navbox places some navbars into at least one category incorrectly. An example is at {{
Dynamics (music)}}, where the navbar does not style any other than the default bg, and yet because {{
Aspects of music}}, which does style a non-default bg, is installed on "Template Dynamics (music)'s" /doc page, that template populates
Category:Navboxes using background colours incorrectly. Tried using |nocat=true
and |nocat=yes
in the "Aspects of music" template on the /doc page, but that doesn't work (each time I tried a purge and a null edit). Since I have not yet mastered Lua, I'm at a loss as to how to fix this. Can anyone help?
Paine Ellsworth
put'r there 19:43, 20 August 2018 (UTC)
Also, I did remove the "Aspects of music" navbar from the /doc page, which did remove the "Dynamics (music)" navbar from the category. Paine Ellsworth put'r there 19:47, 20 August 2018 (UTC)
nocat
). It uses mw.title.getCurrentTitle()
to get the title of the page being rendered. That page is
Template:Dynamics (music). The module then tests if the page is in the Template namespace and, if so, whether it should be ignored (doc/sandbox/testcases). If it is a not-ignored template page, it gets a tracking category if needed. That is why the tracking category is added to
Template:Dynamics (music) but not its /doc subpage (the latter is ignored as a doc page). I think I once tweaked the code which generates the tracking categories but I did not change the logic. As you point out, that logic is somewhat broken, because the aim apparently is to flag templates which use a navbox in certain dubious ways, whereas in this case the dubious usage is in the doc subpage. I can't see a quick fix. I could look at adding nocat if others agree that would be desirable, however, {{
Aspects of music}} would also need an edit to pass the nocat parameter to {{
Navbox}}.
Johnuniq (
talk) 05:45, 21 August 2018 (UTC)
nocat
using the guideline at
WP:NOCAT. I got thoroughly confused about the logic for a while, but I think it's correct now. One source of confusion was that
Module:Navbox uses
Module:Arguments with a default which means |nocat=
is removed from the arguments whereas
WP:NOCAT recommends that should be the same as |nocat=true
. Currently (and saner IMHO), if |nocat=
is used, a tracking category will be added if warranted. I added |nocat=true
to
Template:Aspects of music with the result that
Template:Dynamics (music) is no longer showing the tracking category.
Johnuniq (
talk) 05:11, 22 August 2018 (UTC)
|nocat = {{{nocat|}}}
, which allows "nocat" to be passed on to the instances of the template on /doc pages, and keeps those templates out of the category when they have only the default background color.
Paine Ellsworth
put'r there 05:42, 22 August 2018 (UTC)
|nocat=true
to /doc pages of other non-default bg navbars, those navbars will still populate the category as they should. And if for any reason they are changed back to the default bg in the future, the nocat will kick in and withdraw them from the category. I will start checking the category for other similar instances – I'll see if I can find a way to quickly AWB- check 'em. Thanks again,
Johnuniq for your help on this!
Paine Ellsworth
put'r there 11:21, 22 August 2018 (UTC)I've noticed that Navbox does not display on mobile sites, unless the desktop site is requested and the ".m" is removed from the URL.
Example: moblie ".m" site vs. desktop site using Irish mythology (Ulster) template.
I've tried with multiple mobile browsers Chrome, Firefox, Puffin; on Android, but also on a Windows desktop with ".m" in the URL.
Any help would be appreciated.
Marcas.oduinn ( talk) 19:04, 13 September 2018 (UTC)
I wanted to propose adding some code to the Module that would track when a template has been created with a {{{name}}}
that doesn't match the templates name. I implemented this a while ago on
Module:Sidebar games events and it has been super helpful, so I wanted to give it a try here. My addition would look something like this (would need to test it out in the sandbox a bit):
if mw.title.getCurrentTitle().namespace == 10 and (args.name ~= mw.title.getCurrentTitle().text) then
root:wikitext("[[Category:Navbox templates with incorrect name]]")
end
I can implement it myself but wanted to check before I made such a BOLD edit... -- Zackmann ( Talk to me/ What I been doing) 22:58, 14 November 2018 (UTC)
|name=
we would be halfway there :)
Frietjes (
talk) 23:25, 14 November 2018 (UTC)
I'm not sure this is the right place to ask, apologies. I've come across this template, which links to pages in other languages, where an english page isn't available. It seems to me non-standard, to say the least, but as navboxes aren't my expertise, I would like some informed opinion. Thank you! -- Ben Stone 03:39, 21 November 2018 (UTC)
If the link in navbox is the current page, the link would be disabled and bold. However, if the link contains anchor, the link would be shown like any other. For example, at bottom of PeaZip, the link PEA in template {{ Archive formats}} is shown as normal link, which actually links to the same page. Any way to fix this? -- Franklin Yu ( talk) 06:10, 28 November 2018 (UTC)
[[PeaZip#Native archive format|PEA]]
, #Native archive format
isn't an anchor, it's called the fragment. The anchor is in the
PeaZip page itself, being an id="Native_archive_format"
attribute that is generated by the level 3 subheading ===Native archive format===
.[[Template talk:Navbox]]
→
Template talk:Navbox[[Template talk:Navbox#Style of current page link with anchor]]
→
Template talk:Navbox#Style of current page link with anchorHello, on
Template talk:Authority control#HTML_class I proposed for that template to have an individual class added to it (like class="authority-control"
) and the discussion tended towards first adding support for navboxes to have their own classes in this module. A user mentioned that there is a |bodyclass=
parameter, but it's not for the outermost div, but an inner table (alternative solutions like having an outer div just for that template were considered hacky and a centralized method would be better for every other template that relies on this one). Having an HTML class would be good to have so people who write userscripts, themes, parsing, etc, can specifically target navboxes such as Authority Control. Please consider adding the capability for navboxes to have their own classes, thank you.
Opencooper (
talk) 20:31, 7 December 2018 (UTC)
It displays "A (B, C ·" instead of "A (B, C)" on 26 million pages. Have no idea how to fix it. Help! 188.255.85.195 ( talk) 23:22, 24 January 2019 (UTC)
I am seeing something that I have never noticed before, and I do not see it documented anywhere. When two navbox templates are placed on the same line, and both of them have numbered lists in them, the second navbox is rendered with a bulleted list instead of a numbered list. If the navboxes are placed on separate lines, the second navbox renders with a numbered list, as intended. This happens whether the navboxes are placed directly in an article or listed inside of {{ Navboxes}}.
Please see examples of navboxes with and without line breaks between them
in my sandbox. In the middle section of that page, I have pasted the wikicode output from
Special:ExpandTemplates to show that the only difference is that the <div>
tag that opens the second navbox is on either the same line as the previous navbox's closing div tag, or on a new line. I don't see how that would cause the list inside the second navbox to render as bullets instead of numbers. –
Jonesey95 (
talk) 06:41, 23 May 2019 (UTC)
div col:
div col/sandbox:
Is there a policy on whether navboxes should default to oollapsed / expanded? I collapsed Template:Brexit Party but it was restored without explanation so I collapsed it again and then had this diff: No justification to force this to be collapsed. Should be dealt with on a page by page basis. There are a number of new stub bios of Members of the European Parliament such as James Wells where it is in effect advertising the party and it would mean going around collapsing them one at a time. Pinging @ Redrose64: and @ Izno: since they answer a lot on here. -- The Vintage Feminist ( talk) 17:39, 3 June 2019 (UTC)
There is a proposal to change the behavior of {{ refideas}} to make the content collapsible. Interested editors are invited to give feedback on the talk page. Wugapodes [thɑk] [ˈkan.ˌʧɹɪbz] 18:00, 7 June 2019 (UTC)
On English Wikisource we have some project-specific concerns that necessitate being able to address the entire generated navbox from CSS and JS. We do this with a custom extra parameter (somewhat awkwardly named |wrapclass=
) that allows the template calling _navbox
to pass in a custom CSS class that gets applied to the navbox's wrapping div
. The code for this custom param is a bit of a pain to keep patching in every time we resync from enwp, and it is functionallity that is both cheap and potentially useful elsewhere, so I figured I'd test the waters for adding this functionality (with a better param name) to the upstream module (i.e. here).
The only code change is to the module like so:
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.wrapclass) -- <== NEW: add class passed in wrapclass param
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:node(tbl)
I would suggest something like |navbox-class=
for the parameter name. Thoughts? --
Xover (
talk) 10:33, 10 August 2019 (UTC)
navboxclass
and can be added to the invocation of _navbox
in
Module:Authority control to set the given class on the navbox's wrapper div (that's actually the exact use case at enWS that prompted this). @
Tom.Reding: Can you sync this over from the sandbox to the live module, or should I throw out a {{
TPER}}
? --
Xover (
talk) 15:39, 10 August 2019 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
To improve the performance of the collapsible code, I request to make [1]. This will cause the parser to preload the collapsible code, avoiding an additional resourceloader lazyloading call to be made, which makes pages containing navboxes a little more efficient. — TheDJ ( talk • contribs) 12:33, 14 August 2019 (UTC)
In navboxes with no groupN
, no image, and with width:auto
applied, the default colspan="2"
that gets added to each of the rows causes the navbox to adopt the width of the content in the final row/cell, even when this causes content in earlier rows to wrap. See for example
Template:Set navigation on Yugipedia. Simply removing the unnecessary colspans is enough to fix this (interestingly, at least in Chrome, it seems that just removing the colspan in the header is enough to fix it). I would take a crack at this myself, but I have no idea how to check for the existence of any groupN
without just looping through all the possible names. 「
ディノ奴
千?!」
☎ Dinoguy1000 21:21, 14 July 2019 (UTC)
groupN
parameters would be something like the getArgNums()
function in
Module:Infobox, actually. 「
ディノ奴
千?!」
☎ Dinoguy1000 21:30, 14 July 2019 (UTC)Template:Ainur Group1 (Valar) comprises 2 subgroups and then an ungrouped item, Morgoth. There is no space before the entry "Morgoth".
In contrast, Group 2 (Maiar) starts with some ungrouped items, then two subgroups. The ungrouped entries (Eonwe…) have an appropriate space before the first one.
Is this a weakness in the coding for {{ Navbox}}, or can Template:Ainur be formatted better, to align the spacing of all ungrouped items? – Fayenatic London 14:59, 24 January 2020 (UTC)
<ul>...</ul>
tags, albeit a list with just one item. The list is enclosed in a <div>...</div>
with no styling. Eönwë, Sauron and Melian are also list items, but they do not have enclosing <ul>...</ul>
tags - instead they have an enclosing <div style="padding:0em 0.25em">...</div>
- that 0.25em padding on right and left is what causes the gap. I think that the problem is with {{
navbox}}
, and may be a
WP:VPT matter. --
Redrose64 🌹 (
talk) 23:39, 24 January 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
line 68
: content:match('^<span class="nowrap">') then
change as content:match('^') then
.
This change will affect on
Special:LintErrors for
Misnested tag with different rendering in HTML5 and HTML4 and it will reduce many errors. Warm Regards,
ZI Jony
(Talk) 07:42, 11 March 2020 (UTC)
{{
edit template-protected}}
template.
Izno (
talk) 12:06, 11 March 2020 (UTC)
@ Randomtransmans: Why did you create Template:Navbox subgroup? When doing that, you should have seen a notice that the page was deleted on 16 March 2019 per this TfD. It is used in Template:Touch! Generations which you also created. I can hardly remember, but I believe the subgroup template is redundant and should be replaced with plain navbox. Perhaps others with better recollection can confirm. The template is eligible for speedy deletion but no harm in asking first. Johnuniq ( talk) 23:49, 5 June 2020 (UTC)
Hey I want to add that, I want people to view the history of the Navbox, the abbreviation should be "H" and when putting the pointer on it, it would say "View the history for this template" can you add that? — Preceding unsigned comment added by Gamerknowitall ( talk • contribs) 02:32, 7 June 2020 (UTC)
Hello! Maybe someone here has a better understanding of how the odd/even striping in this template functions, I am a bit lost right now. I am trying to properly export the template to dewiki, in order to replace the current de:Template:Erweiterte Navigationsleiste (there are lots of compatibility changes I will have to make, of course). As can be seen on my testing page, a lot is working well already, but in the child and collapsible examples the striping does not work as intended. I am not aware of any changes I made to the code ( module, styles) with regards to the striping. Any ideas? Thanks, XanonymusX ( talk) 10:38, 25 July 2020 (UTC)
if not item:match ("{\|") then item = item:gsub ("\n([^\*])", " %1") -- listed items without table/ul/ol end
Template:University of Michigan uses a dark blue background with white text (including for links). I just made this fix so that, when a reader hovers a cursor over a link, the underline appears white, rather than the normal blue (which is nearly invisible). The template's show and hide buttons have a white underline somehow too. However, the VTE buttons have the blue underline. Could we make a fix so that they will be white as well? I'm not sure exactly where the code is that's leading to the current display, but since the show/hide renders correctly, I assume the issue is more likely here than there. (please mention me on reply) {{u| Sdkb}} talk 06:38, 3 August 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In line 453 args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}})
, the obsolete
Template:Navbox subgroup should probably be deleted. –
XanonymusX (
talk) 15:17, 3 August 2020 (UTC)
Why does {{MSC Malaysia|state=open}} {{MSC Malaysia}} show the first instance expanded?
It seems that any value for |state=
, other than the canonical values, will expand the navbox. --
Michael Bednarek (
talk) 03:10, 5 September 2020 (UTC)
autocollapse, collapsed, expanded, plain, off
). Why would you want to use another? --
Redrose64 🌹 (
talk) 08:26, 5 September 2020 (UTC)
|state=open
was inserted into an article, and I was about to correct it when I noticed this behaviour. It seems quite common:
insource:/state=open/. --
Michael Bednarek (
talk) 10:08, 5 September 2020 (UTC)
A navbox with [state=]autocollapse will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded.That appears to be consistent with the behavior that is observed here. – Jonesey95 ( talk) 13:27, 5 September 2020 (UTC)
|state=
, and goes on: If set to expanded
, the navbox will always start out in an expanded state.
My point is that an infinite number of other values will also expand the box. --
Michael Bednarek (
talk) 02:09, 6 September 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Decorative images are often not connected directly to the topic of the article, and as such can be confusing when stumbled upon when flipping through images in a Media Viewer interface. See Wikipedia:Village pump (technical) § Invisible Pictures ( permalink). Please apply Special:Diff/976559973/979741741 to Module:Navbox to remove such decorative images from Media Viewer. — andrybak ( talk) 16:44, 22 September 2020 (UTC)
{{ Neolithic Chronology}} includes a number of references in the template. When it's transcluded after the {{ Reflist}} template (as it should be), the references end up floating awkwardly at the bottom of the page. Is there a standard way to handle footnotes/references in navboxes? Can you display them somewhere in the template itself? Do citations even belong in navboxes? I found one discussion about this from 2012 ( Template_talk:Navbox/Archive_16#hlist and footnote groups) but it didn't reach a firm conclusion. – Joe ( talk) 14:50, 27 October 2020 (UTC)
This 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. |
Archive 15 | ← | Archive 20 | Archive 21 | Archive 22 | Archive 23 | Archive 24 |
There was a change made a number of years ago to line-break handling either as part of the Common CSS and / or somewhere else. I'm not sure if it was done intentionally or if it was overlooked, but as a result of these changes wrapping is not currently being handled correctly within many {{ navbox}}es when they use {{ hlist}}. See these examples of one section of the {{ Wikipedia technical help}} template and note how the bullets between each item can sometimes start a newline when changing the width of the page, which is not desired:
Examples
|
---|
{{Navbox | title = [[Help:Directory#Technical help|Wikipedia technical help]] | listclass = hlist | state = {{{state<includeonly>|{{{1|autocollapse}}}</includeonly>}}} | basestyle = text-align: center; | name = Wikipedia technical help | bodyclass=hlist | above = '''Get personal technical help at [[Wikipedia:Teahouse|the Teahouse]], [[Wikipedia:Help desk|Help desk]], [[Wikipedia:Village pump (technical)|Village pump (technical)]], [[Help:Introduction to talk pages/1|talk pages]] or [[Wikipedia:IRC|IRC]].''' | group3 = [[Wikitext]] | list3 = {{nowrap begin}}[[Help:Wikitext|Wikitext main page]] ([[Help:Cheatsheet|Cheatsheet]]){{·w}} [[Help:Using colours|Colours use]]{{·w}} [[Help:Columns|Column]]s{{·w}} [[Wikipedia:Line-break handling|Line-break handling]]{{·w}} [[Help:List|Lists]]{{·w}} [[Help:Magic words|Magic words]] ([[Help:Magic words for beginners|For beginners]]{{·w}} [[Help:Conditional expressions|Conditional expressions]]{{·w}} [[Help:Switch parser function|Switch parser function]]{{·w}} [[Help:Time function|Time function]]){{·w}} [[Help:Redirect|Redirects]]{{·w}} [[Help:Section|Sections and TOCs]]{{·w}} [[Help:Table|Tables]] ([[Help:Introduction to tables with Wiki Markup/1|Introduction]]{{·w}} [[Help:Basic table markup|Basics]]{{·w}} [[Help:Conditional tables|Conditional tables]]{{·w}} [[Help:Sorting|Sorting]]{{·w}} [[Help:Collapsing|Collapsing]]{{·w}} [[Wikipedia:Advanced table formatting|Advanced table formatting]]){{nowrap end}} | below = {{nowrap begin}}'''See also: [[:Category:Wikipedia information pages]]'''{{·w}} '''[[:Category:Wikipedia how-to]]'''<br>Further navigation at: [[Template:Wikipedia help pages|Help pages]] ([[Template:Administrators' guide|Administrators]]){{·w}} [[Template:Wikipedia template messages|Templates]]{{·w}} [[Template:Wikipedia referencing|Referencing]] ([[Template:Citation metadata navbox|Citation metadata]]){{·w}} [[Wikipedia:WikiProject Accessibility/Navigation menu|Accessibility]]{{·w}} [[Template:Botnav|Bots]]{{·w}} [[Wikipedia:User scripts/Navbox|User scripts]]{{·w}} [[Template:Wikipedia accounts|Accounts]]{{nowrap end}} }} |
My (very limited) understanding of why this was done is that it had something to do with IE not rendering the line breaks properly with the old system. I realize this will need to be a larger discussion and for all I know that discussion could have already happened, but I don't know if or when as I haven't been as active on Wikipedia in the last 10 years or so. I would appreciate it if someone could point me in the right direction to read more about this. If it hasn't been properly discussed, where would be the best place to raise this issue? I see in the deletion discussion for {{ ·wrap}} that this issue was brought up but then quickly dismissed. Was it working properly back then and then has subsequently regressed?
Thanks so much for pointing me in the right direction. - Paul T +/ C 21:15, 7 March 2018 (UTC)
In the {{{image}}}
parameter, I have specified my image the same way I did on another page. And if I put the same image below the Navbox, it also shows up. I also have a {{{list1}}}
. Any ideas why the image is not showing?
Lithimlin (
talk) 19:09, 17 April 2018 (UTC)
Hello there. I have been editing and creating Navboxes and Sidebars for a while, and I have a sense for when is better to use each. However, I was wondering if more spelled-out guidelines, or essays on the topic exist. If no guidance exists, I am not suggesting that it should; not everything needs to be spelled out. However, if it does exist, I would be interested to know and read it. One final note: THANK YOU to whoever established and developed them in Wikipedia. They are invaluable in finding articles and bringing order and structure to Wikipedia. Thank you!( talk) user:Al83tito 16:20, 6 July 2018 (UTC)
Module:Team roster navbox is a wrapper for
Module:Navbox that does two extra things (1) adds |nowraplinks=yes
and (2) automatically applies background/color styling to the title, above, group, and below fields. the first feature is trivial, but the second feature is rather useful. for example, compare
{{team roster navbox | name = Template talk:Navbox | title = [[Template:Navbox]] | titlestyle = background-color:black; color:white; }}
and
{{navbox | name = Template talk:Navbox | title = [[Template:Navbox]] | titlestyle = background-color:black; color:white; }}
if there are no objections, I would like to add this link coloring feature to
Module:Navbox directly. it would be turned on using |stylelinks=yes
parameter, which means "apply the parent element background and color style parameter to the text inside the links". comments? suggestions?
Frietjes (
talk) 19:11, 9 July 2018 (UTC)
Followers of this page may be interested in WT:TemplateStyles#In the context of meta templates. Please take a moment to comment there. -- Izno ( talk) 01:38, 27 July 2018 (UTC)
Not sure if this is a flaw... I noted that
Module:Navbox places some navbars into at least one category incorrectly. An example is at {{
Dynamics (music)}}, where the navbar does not style any other than the default bg, and yet because {{
Aspects of music}}, which does style a non-default bg, is installed on "Template Dynamics (music)'s" /doc page, that template populates
Category:Navboxes using background colours incorrectly. Tried using |nocat=true
and |nocat=yes
in the "Aspects of music" template on the /doc page, but that doesn't work (each time I tried a purge and a null edit). Since I have not yet mastered Lua, I'm at a loss as to how to fix this. Can anyone help?
Paine Ellsworth
put'r there 19:43, 20 August 2018 (UTC)
Also, I did remove the "Aspects of music" navbar from the /doc page, which did remove the "Dynamics (music)" navbar from the category. Paine Ellsworth put'r there 19:47, 20 August 2018 (UTC)
nocat
). It uses mw.title.getCurrentTitle()
to get the title of the page being rendered. That page is
Template:Dynamics (music). The module then tests if the page is in the Template namespace and, if so, whether it should be ignored (doc/sandbox/testcases). If it is a not-ignored template page, it gets a tracking category if needed. That is why the tracking category is added to
Template:Dynamics (music) but not its /doc subpage (the latter is ignored as a doc page). I think I once tweaked the code which generates the tracking categories but I did not change the logic. As you point out, that logic is somewhat broken, because the aim apparently is to flag templates which use a navbox in certain dubious ways, whereas in this case the dubious usage is in the doc subpage. I can't see a quick fix. I could look at adding nocat if others agree that would be desirable, however, {{
Aspects of music}} would also need an edit to pass the nocat parameter to {{
Navbox}}.
Johnuniq (
talk) 05:45, 21 August 2018 (UTC)
nocat
using the guideline at
WP:NOCAT. I got thoroughly confused about the logic for a while, but I think it's correct now. One source of confusion was that
Module:Navbox uses
Module:Arguments with a default which means |nocat=
is removed from the arguments whereas
WP:NOCAT recommends that should be the same as |nocat=true
. Currently (and saner IMHO), if |nocat=
is used, a tracking category will be added if warranted. I added |nocat=true
to
Template:Aspects of music with the result that
Template:Dynamics (music) is no longer showing the tracking category.
Johnuniq (
talk) 05:11, 22 August 2018 (UTC)
|nocat = {{{nocat|}}}
, which allows "nocat" to be passed on to the instances of the template on /doc pages, and keeps those templates out of the category when they have only the default background color.
Paine Ellsworth
put'r there 05:42, 22 August 2018 (UTC)
|nocat=true
to /doc pages of other non-default bg navbars, those navbars will still populate the category as they should. And if for any reason they are changed back to the default bg in the future, the nocat will kick in and withdraw them from the category. I will start checking the category for other similar instances – I'll see if I can find a way to quickly AWB- check 'em. Thanks again,
Johnuniq for your help on this!
Paine Ellsworth
put'r there 11:21, 22 August 2018 (UTC)I've noticed that Navbox does not display on mobile sites, unless the desktop site is requested and the ".m" is removed from the URL.
Example: moblie ".m" site vs. desktop site using Irish mythology (Ulster) template.
I've tried with multiple mobile browsers Chrome, Firefox, Puffin; on Android, but also on a Windows desktop with ".m" in the URL.
Any help would be appreciated.
Marcas.oduinn ( talk) 19:04, 13 September 2018 (UTC)
I wanted to propose adding some code to the Module that would track when a template has been created with a {{{name}}}
that doesn't match the templates name. I implemented this a while ago on
Module:Sidebar games events and it has been super helpful, so I wanted to give it a try here. My addition would look something like this (would need to test it out in the sandbox a bit):
if mw.title.getCurrentTitle().namespace == 10 and (args.name ~= mw.title.getCurrentTitle().text) then
root:wikitext("[[Category:Navbox templates with incorrect name]]")
end
I can implement it myself but wanted to check before I made such a BOLD edit... -- Zackmann ( Talk to me/ What I been doing) 22:58, 14 November 2018 (UTC)
|name=
we would be halfway there :)
Frietjes (
talk) 23:25, 14 November 2018 (UTC)
I'm not sure this is the right place to ask, apologies. I've come across this template, which links to pages in other languages, where an english page isn't available. It seems to me non-standard, to say the least, but as navboxes aren't my expertise, I would like some informed opinion. Thank you! -- Ben Stone 03:39, 21 November 2018 (UTC)
If the link in navbox is the current page, the link would be disabled and bold. However, if the link contains anchor, the link would be shown like any other. For example, at bottom of PeaZip, the link PEA in template {{ Archive formats}} is shown as normal link, which actually links to the same page. Any way to fix this? -- Franklin Yu ( talk) 06:10, 28 November 2018 (UTC)
[[PeaZip#Native archive format|PEA]]
, #Native archive format
isn't an anchor, it's called the fragment. The anchor is in the
PeaZip page itself, being an id="Native_archive_format"
attribute that is generated by the level 3 subheading ===Native archive format===
.[[Template talk:Navbox]]
→
Template talk:Navbox[[Template talk:Navbox#Style of current page link with anchor]]
→
Template talk:Navbox#Style of current page link with anchorHello, on
Template talk:Authority control#HTML_class I proposed for that template to have an individual class added to it (like class="authority-control"
) and the discussion tended towards first adding support for navboxes to have their own classes in this module. A user mentioned that there is a |bodyclass=
parameter, but it's not for the outermost div, but an inner table (alternative solutions like having an outer div just for that template were considered hacky and a centralized method would be better for every other template that relies on this one). Having an HTML class would be good to have so people who write userscripts, themes, parsing, etc, can specifically target navboxes such as Authority Control. Please consider adding the capability for navboxes to have their own classes, thank you.
Opencooper (
talk) 20:31, 7 December 2018 (UTC)
It displays "A (B, C ·" instead of "A (B, C)" on 26 million pages. Have no idea how to fix it. Help! 188.255.85.195 ( talk) 23:22, 24 January 2019 (UTC)
I am seeing something that I have never noticed before, and I do not see it documented anywhere. When two navbox templates are placed on the same line, and both of them have numbered lists in them, the second navbox is rendered with a bulleted list instead of a numbered list. If the navboxes are placed on separate lines, the second navbox renders with a numbered list, as intended. This happens whether the navboxes are placed directly in an article or listed inside of {{ Navboxes}}.
Please see examples of navboxes with and without line breaks between them
in my sandbox. In the middle section of that page, I have pasted the wikicode output from
Special:ExpandTemplates to show that the only difference is that the <div>
tag that opens the second navbox is on either the same line as the previous navbox's closing div tag, or on a new line. I don't see how that would cause the list inside the second navbox to render as bullets instead of numbers. –
Jonesey95 (
talk) 06:41, 23 May 2019 (UTC)
div col:
div col/sandbox:
Is there a policy on whether navboxes should default to oollapsed / expanded? I collapsed Template:Brexit Party but it was restored without explanation so I collapsed it again and then had this diff: No justification to force this to be collapsed. Should be dealt with on a page by page basis. There are a number of new stub bios of Members of the European Parliament such as James Wells where it is in effect advertising the party and it would mean going around collapsing them one at a time. Pinging @ Redrose64: and @ Izno: since they answer a lot on here. -- The Vintage Feminist ( talk) 17:39, 3 June 2019 (UTC)
There is a proposal to change the behavior of {{ refideas}} to make the content collapsible. Interested editors are invited to give feedback on the talk page. Wugapodes [thɑk] [ˈkan.ˌʧɹɪbz] 18:00, 7 June 2019 (UTC)
On English Wikisource we have some project-specific concerns that necessitate being able to address the entire generated navbox from CSS and JS. We do this with a custom extra parameter (somewhat awkwardly named |wrapclass=
) that allows the template calling _navbox
to pass in a custom CSS class that gets applied to the navbox's wrapping div
. The code for this custom param is a bit of a pain to keep patching in every time we resync from enwp, and it is functionallity that is both cheap and potentially useful elsewhere, so I figured I'd test the waters for adding this functionality (with a better param name) to the upstream module (i.e. here).
The only code change is to the module like so:
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.wrapclass) -- <== NEW: add class passed in wrapclass param
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:node(tbl)
I would suggest something like |navbox-class=
for the parameter name. Thoughts? --
Xover (
talk) 10:33, 10 August 2019 (UTC)
navboxclass
and can be added to the invocation of _navbox
in
Module:Authority control to set the given class on the navbox's wrapper div (that's actually the exact use case at enWS that prompted this). @
Tom.Reding: Can you sync this over from the sandbox to the live module, or should I throw out a {{
TPER}}
? --
Xover (
talk) 15:39, 10 August 2019 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
To improve the performance of the collapsible code, I request to make [1]. This will cause the parser to preload the collapsible code, avoiding an additional resourceloader lazyloading call to be made, which makes pages containing navboxes a little more efficient. — TheDJ ( talk • contribs) 12:33, 14 August 2019 (UTC)
In navboxes with no groupN
, no image, and with width:auto
applied, the default colspan="2"
that gets added to each of the rows causes the navbox to adopt the width of the content in the final row/cell, even when this causes content in earlier rows to wrap. See for example
Template:Set navigation on Yugipedia. Simply removing the unnecessary colspans is enough to fix this (interestingly, at least in Chrome, it seems that just removing the colspan in the header is enough to fix it). I would take a crack at this myself, but I have no idea how to check for the existence of any groupN
without just looping through all the possible names. 「
ディノ奴
千?!」
☎ Dinoguy1000 21:21, 14 July 2019 (UTC)
groupN
parameters would be something like the getArgNums()
function in
Module:Infobox, actually. 「
ディノ奴
千?!」
☎ Dinoguy1000 21:30, 14 July 2019 (UTC)Template:Ainur Group1 (Valar) comprises 2 subgroups and then an ungrouped item, Morgoth. There is no space before the entry "Morgoth".
In contrast, Group 2 (Maiar) starts with some ungrouped items, then two subgroups. The ungrouped entries (Eonwe…) have an appropriate space before the first one.
Is this a weakness in the coding for {{ Navbox}}, or can Template:Ainur be formatted better, to align the spacing of all ungrouped items? – Fayenatic London 14:59, 24 January 2020 (UTC)
<ul>...</ul>
tags, albeit a list with just one item. The list is enclosed in a <div>...</div>
with no styling. Eönwë, Sauron and Melian are also list items, but they do not have enclosing <ul>...</ul>
tags - instead they have an enclosing <div style="padding:0em 0.25em">...</div>
- that 0.25em padding on right and left is what causes the gap. I think that the problem is with {{
navbox}}
, and may be a
WP:VPT matter. --
Redrose64 🌹 (
talk) 23:39, 24 January 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
line 68
: content:match('^<span class="nowrap">') then
change as content:match('^') then
.
This change will affect on
Special:LintErrors for
Misnested tag with different rendering in HTML5 and HTML4 and it will reduce many errors. Warm Regards,
ZI Jony
(Talk) 07:42, 11 March 2020 (UTC)
{{
edit template-protected}}
template.
Izno (
talk) 12:06, 11 March 2020 (UTC)
@ Randomtransmans: Why did you create Template:Navbox subgroup? When doing that, you should have seen a notice that the page was deleted on 16 March 2019 per this TfD. It is used in Template:Touch! Generations which you also created. I can hardly remember, but I believe the subgroup template is redundant and should be replaced with plain navbox. Perhaps others with better recollection can confirm. The template is eligible for speedy deletion but no harm in asking first. Johnuniq ( talk) 23:49, 5 June 2020 (UTC)
Hey I want to add that, I want people to view the history of the Navbox, the abbreviation should be "H" and when putting the pointer on it, it would say "View the history for this template" can you add that? — Preceding unsigned comment added by Gamerknowitall ( talk • contribs) 02:32, 7 June 2020 (UTC)
Hello! Maybe someone here has a better understanding of how the odd/even striping in this template functions, I am a bit lost right now. I am trying to properly export the template to dewiki, in order to replace the current de:Template:Erweiterte Navigationsleiste (there are lots of compatibility changes I will have to make, of course). As can be seen on my testing page, a lot is working well already, but in the child and collapsible examples the striping does not work as intended. I am not aware of any changes I made to the code ( module, styles) with regards to the striping. Any ideas? Thanks, XanonymusX ( talk) 10:38, 25 July 2020 (UTC)
if not item:match ("{\|") then item = item:gsub ("\n([^\*])", " %1") -- listed items without table/ul/ol end
Template:University of Michigan uses a dark blue background with white text (including for links). I just made this fix so that, when a reader hovers a cursor over a link, the underline appears white, rather than the normal blue (which is nearly invisible). The template's show and hide buttons have a white underline somehow too. However, the VTE buttons have the blue underline. Could we make a fix so that they will be white as well? I'm not sure exactly where the code is that's leading to the current display, but since the show/hide renders correctly, I assume the issue is more likely here than there. (please mention me on reply) {{u| Sdkb}} talk 06:38, 3 August 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In line 453 args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}})
, the obsolete
Template:Navbox subgroup should probably be deleted. –
XanonymusX (
talk) 15:17, 3 August 2020 (UTC)
Why does {{MSC Malaysia|state=open}} {{MSC Malaysia}} show the first instance expanded?
It seems that any value for |state=
, other than the canonical values, will expand the navbox. --
Michael Bednarek (
talk) 03:10, 5 September 2020 (UTC)
autocollapse, collapsed, expanded, plain, off
). Why would you want to use another? --
Redrose64 🌹 (
talk) 08:26, 5 September 2020 (UTC)
|state=open
was inserted into an article, and I was about to correct it when I noticed this behaviour. It seems quite common:
insource:/state=open/. --
Michael Bednarek (
talk) 10:08, 5 September 2020 (UTC)
A navbox with [state=]autocollapse will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded.That appears to be consistent with the behavior that is observed here. – Jonesey95 ( talk) 13:27, 5 September 2020 (UTC)
|state=
, and goes on: If set to expanded
, the navbox will always start out in an expanded state.
My point is that an infinite number of other values will also expand the box. --
Michael Bednarek (
talk) 02:09, 6 September 2020 (UTC)
This
edit request to
Module:Navbox has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Decorative images are often not connected directly to the topic of the article, and as such can be confusing when stumbled upon when flipping through images in a Media Viewer interface. See Wikipedia:Village pump (technical) § Invisible Pictures ( permalink). Please apply Special:Diff/976559973/979741741 to Module:Navbox to remove such decorative images from Media Viewer. — andrybak ( talk) 16:44, 22 September 2020 (UTC)
{{ Neolithic Chronology}} includes a number of references in the template. When it's transcluded after the {{ Reflist}} template (as it should be), the references end up floating awkwardly at the bottom of the page. Is there a standard way to handle footnotes/references in navboxes? Can you display them somewhere in the template itself? Do citations even belong in navboxes? I found one discussion about this from 2012 ( Template_talk:Navbox/Archive_16#hlist and footnote groups) but it didn't reach a firm conclusion. – Joe ( talk) 14:50, 27 October 2020 (UTC)