This is the talk page for discussing improvements to the Global Lua Modules/Navbox page.
- Please sign and date your posts by typing four tildes (
~~~~
). - Put new text under old text. Click here to start a new topic.
- If you're new to the wiki, please take a look at the talk page help.
- Be polite
- Assume good faith
- Be welcoming
Parameters provided in parser functions[]
Wanted to make a comprehensive navbox template that would have several main sections collapsed by default (via defaultstate = collapsed
), but depending on navbox template value ({{{1|}}}
) a certain section would be expanded.
First I tried #switch
parser function, I've inserted it at the end (inside) of navbox code, it goes like this (had to replace |
and =
):
{{#switch: {{{1}}} |new = {{!}}state3 {{=}} expanded |true = {{!}}state5 {{=}} expanded |misc = {{!}}state7 {{=}} expanded |{{!}}state2 {{=}} expanded}} }}
But it doesn't work.
Instead a get, in case of no value, |state2 = expanded
as simple text as the last row of the navbox, while all sections remain collapsed. Same if value is here - different number, same simple text. If I remove defaultstate
and go with values being {{!}}state(n) {{=}} collaspsed
- same thing, except everything is expanded. Same if I try to replace value with a special sub template.
Then I tried #if
, where I wouldn't have to replace =
and can see with empty value, but the result is exactly the same.
MtMB (talk) 11:30, 4 January 2022 (UTC)
- remove the {{!}} thing (use |{{#switch...}}), use simple =, set default state as #default=state2=expanded; place the switch out of the template call, so you will see the result. also, some links would be helpful. Fngplg (talk) 11:47, 4 January 2022 (UTC)
- Resolved.
- MtMB (talk) 22:21, 4 January 2022 (UTC)
[]
Hello, the navbox is not displayed on mobile... Cordialy Valentin5228 (talk) 12:36, 20 January 2022 (UTC)
- Yup, that's intended behavior. You might want to see wikipedia:Template:Navbox for more info. SuperDragonXD1 talk/wall (cc wall) • contribs • logs 12:55, 20 January 2022 (UTC)
- Yes but suddenly, how do we solve the problem because on Wikipedia, we don't say how to solve the problem...Valentin5228 (talk) 18:25, 22 January 2022 (UTC)
- There is no problem... the navbox is by default hidden on mobile, for SEO reasons and such... SuperDragonXD1 talk/wall (cc wall) • contribs • logs 02:41, 23 January 2022 (UTC)
- Yes but suddenly, how do we solve the problem because on Wikipedia, we don't say how to solve the problem...Valentin5228 (talk) 18:25, 22 January 2022 (UTC)
" / "[]
Hello, I just saw that when we put to a list:
- Listing
- Text in brackets
- Text in brackets
The text between brackets is separated by " / " instead of " • ", is this normal? I looked at the CSS code of the navboxes and I spotted this:
.hlist ul ul li:after { happy: "/"; }
Cordially Valentin5228 (talk) 08:30, 7 May 2022 (UTC)
Link colors[]
How can you have the link colors changed by customization of titlestyle
groupstyle
etc. Sid Chang 01:57, 8 February 2023 (UTC)