Template talk:Navbar
Template:Navbar is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This template was considered for merging with Template:V on 2014 July 27. The result of the discussion was "no consensus". |
This template was considered for merging with Template:V and Template:View on 2017 March 5. The result of the discussion was "merge, assuming there are no technical problems". |
Text and/or other creative content from this version of Module:Navbar was copied or moved into incubator:Module:Wp/nod/Navbar with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 5 sections are present. |
Related pages |
---|
Bug in move option
[edit]
Further to the section above, the move option does not work correctly when the template name includes a space - using {{view|Example template|m}}
produces
note that the second link displays as "templatemove" and the link goes to https://en.wikipedia.org/w/index.php?title=Special:Movepage&target=Template:Example which is not what is intended - the link should display as "move" and the link should be https://en.wikipedia.org/w/index.php?title=Special:Movepage&target=Template:Example_template
It makes no difference if the space is replaced by an underscore, nor if the first parameter is named - that is, {{view|Example template|m}}
, {{view|Example_template|m}}
, {{view|template=Example template|m}}
and {{view|template=Example_template|m}}
all yield identical results.
However, if the space is replaced by a plus sign, as in {{view|Example+template|m}}
the move link is now correct, but the view link is broken:
It seems that there is no way to have both the view and move links correct. --Redrose64 🌹 (talk) 12:20, 7 January 2023 (UTC)
This bug is presumably in Module:Navbar. Curiously, Module talk:Navbar redirects here, but Template talk:View redirects to Template talk:VTE. --Redrose64 🌹 (talk) 12:25, 7 January 2023 (UTC)
- Same with {{v}}:
{{v|Example template|m}}
}} produces . -DePiep (talk) 12:29, 7 January 2023 (UTC)- Yes, so I've set up some testcases at Template:Navbar/testcases#Demonstrating bug in move option. --Redrose64 🌹 (talk) 13:20, 7 January 2023 (UTC)
- So, for the time being remove from documentation, or add a heavy warning? DePiep (talk) 07:46, 8 January 2023 (UTC)
- I highly doubt it's even in use, and the failure point is a small subset of potential template names, so I think "fix the issue" is preferable. That being said I, I haven't looked at it in too much detail but I suspect it has to do with how the module is creating the URLs for the links (much like how elink templates need to use {{urlencode}} to properly format URLs). Primefac (talk) 08:07, 8 January 2023 (UTC)
- I edited Module:Navbar/sandbox with what I suspect will fix the problem. I would want to think about the change much more, and test it, before updating the main module. One of my edit summaries says Module:Navbar/sandbox was the same as Module:Navbar before I started. That is not quite correct—the sandbox has
local cfg = mw.loadData('Module:Navbar/configuration/sandbox')
whereas the main module omits/sandbox
. That should be fixed before updating. Johnuniq (talk) 10:07, 8 January 2023 (UTC)
- I edited Module:Navbar/sandbox with what I suspect will fix the problem. I would want to think about the change much more, and test it, before updating the main module. One of my edit summaries says Module:Navbar/sandbox was the same as Module:Navbar before I started. That is not quite correct—the sandbox has
- I highly doubt it's even in use, and the failure point is a small subset of potential template names, so I think "fix the issue" is preferable. That being said I, I haven't looked at it in too much detail but I suspect it has to do with how the module is creating the URLs for the links (much like how elink templates need to use {{urlencode}} to properly format URLs). Primefac (talk) 08:07, 8 January 2023 (UTC)
- So, for the time being remove from documentation, or add a heavy warning? DePiep (talk) 07:46, 8 January 2023 (UTC)
- Yes, so I've set up some testcases at Template:Navbar/testcases#Demonstrating bug in move option. --Redrose64 🌹 (talk) 13:20, 7 January 2023 (UTC)
Custom css to display navigation templates on mobile?
[edit]Is there some custom css I can add to force unhiding navigation templates on mobile? I'm not concerned if they are ugly or affect the overall formatting of the articles they appear in. I just miss them. Folly Mox (talk) 12:47, 16 August 2023 (UTC)
- This is the page for navbar (the v-t-e links) not navbox. Regardless of that, I don't think it's possible: the navbox HTML doesn't seem to be present in the HTML source for pages on mobile, so it's been suppressed by the MediaWiki software. --Redrose64 🌹 (talk) 21:32, 16 August 2023 (UTC)
- Oops! Well, thanks for the info 😔 Folly Mox (talk) 22:16, 16 August 2023 (UTC)
Protected edit request on 10 October 2023
[edit]This edit request to Module:Navbar has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change the links to use Special:EditPage and Special:PageHistory, as I have done here. We don't need to use the fullurl for those two links. SWinxy (talk) 00:55, 10 October 2023 (UTC)
Inaccessible links in navbar
[edit]Moved to Template talk:Navbox#Inaccessible links in navbar. Izno (talk) 02:05, 23 February 2024 (UTC)
Urgent: Please fix this template for printed content Module:Navbar/styles.css.
[edit]Firstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
- Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
- Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at phab:T369874.
Jon (WMF) (talk) 18:21, 2 August 2024 (UTC) on behalf of the web team.