Template talk:Collapsible list
From Wikipedia, the free encyclopedia
Contents |
[edit] Collapsed option?
It would be most helpful to a collapsed option when only one list is present. Can this be done? —MJCdetroit 17:53, 27 July 2007 (UTC)
- Unfotunately, I do not think this is possible. The list is implemented using NavFrame, and the documentation for this feature indicates that you cannot control the initial state, as best I can tell. —Duae Quartunciae (talk · cont) 11:22, 5 August 2007 (UTC)
===Sister template: Template:Collapsible list collapsed===
I created a sister template that is always collapsed. It is located at Template:Collapsible list collapsed. While it would be best to have one template that has the option to collapse, this will have to do until someone can figure out how this can be done. It's beyond me. —MJCdetroit 01:37, 6 August 2007 (UTC)
- With the tweaks described below, this sister template is not needed. It will be deleted. —MJCdetroit 03:14, 29 August 2007 (UTC)
[edit] New options to always collapse the list and hide the borders
I tweaked the template so that it can always be collapsed by adding |list_style = text-align:left;display:none;
and/or so that it could have its border hidden by adding |frame_style = border:none; padding: 0;
. See the doc page or an example at the infobox on the Vancouver page. —MJCdetroit 03:14, 29 August 2007 (UTC)
[edit] Corrected a bug with closing div tags
I have modified the code for this template to correct a problem with closing div tags. Previously, all thirty possible rows generated a </div> tag, whether the corresponding parameter was given or not. Now I have moved this tag inside the #if for that list item, and the right number of div tags is generated. —Duae Quartunciae (talk · cont) 11:18, 5 August 2007 (UTC)
[edit] navFrame doesn't work with if js is turned off
If your initial state is display:none and have java script turned off, then you can never expand the list... --ChoChoPK (球球PK) (talk | contrib) 01:33, 3 September 2007 (UTC)
- Yes, I agree. I will remove the display:none; revert if there's a good reason for it. Gimmetrow 08:08, 2 December 2007 (UTC)
[edit] BUG---Item #1 on list not showing up? Any ideas?
{{Collapsible list |title=[[Great Lakes]] States |frame_style=border:1px solid #aaa; padding: 1; |title_style = |list_style = text-align:left;display:none; <!--NOTICE: list_style makes the list stay collapsed--> |1=[[Michigan]] |2=[[Ohio]] |3=[[Indiana]] |4=[[Illinois]] |5= [[Minnesota]]<!-- <!-- the #= is optional, but if used, then all entries must have it-->--> |6= [[Wisconsin]] |7= [[Pennsylvania]] |8= [[New York]] |}}
Notice how the first spot is blank instead of showing Michigan. Anyone have any ideas? —MJCdetroit (yak) 15:10, 27 March 2008 (UTC)
- You need to delete the final pipe (as I've done in the active version above). I guess the parser treats the pipe as introducing another parameter (equal to nothing), and being the first unnamed parameter treats it as {{{1}}}, overriding the value previously set for {{{1}}}.--Kotniski (talk) 20:00, 27 March 2008 (UTC)
- Those damn pipes! Thanks K, I'll fix the doc page. —MJCdetroit (yak) 20:03, 27 March 2008 (UTC)
[edit] Hide/Show button in the middle of an infobox
See Bassar. Any ideas how to keep the hide/show button from showing up in the middle of an infobox but keep the list next to the infobox? —MJCdetroit (yak) 16:32, 14 May 2008 (UTC)