Template talk:Hidden
| Template:Hidden is permanently protected from editing, and can therefore only be edited by administrators, since it is a heavily used or visible template. Substantial changes should be proposed here, if the proposal is uncontroversial or has been discussed and is supported by consensus. Use {{edit protected}} to attract the attention of an administrator in such cases. Any contributor may edit the template's documentation to add usage notes, categories or interwiki links. |
[edit] Why doesn't this work?
{{hidden|Kennedys hut|{{Wikipedia:Featured picture candidates/Kennedys hut}}}}
-->
[edit] Kennedy's Hut
Other version are availible here. (I kinda like the sepia effects)
- Support Self Nom. --Fir0002 www 23:00, 1 April 2006 (UTC)
- Oppose - good, but not great. Rather bland composition. -- P199 01:39, 2 April 2006 (UTC)
- I don't know - the washed sky and non-directional light gives a very depressing feeling...but I don't dislike that...but I don't know if I like it either. Why does it look like the bark has exploded off of the surrounding trees?--Deglr6328 02:32, 2 April 2006 (UTC)
- neutral for now. the large tree is distracting. pschemp | talk 05:44, 2 April 2006 (UTC)
- Weak support version 2 Looks better in full size.
The blown-out sky doesn't disturb me, and it's unavoidable in this type of lighting - the hut is deep in shade, and the bright, cloudy sky is behind the trees.Apparently, it's not unavoidable - or is this a clever composite of two bracketed shots? --Janke | Talk 07:16, 2 April 2006 (UTC)
- OpposeThe sky is completely burned out. Also pic 02 looks better than this (at least no huge patch of burned out sky). --antilived T | C 09:26, 2 April 2006 (UTC)
- Oppose very messy Leidiot 09:46, 2 April 2006 (UTC)
- Oppose doesn't grab the attention. --BillC 10:16, 2 April 2006 (UTC)
- Neutral. I disagree with a lot of the other opposing reasons though. I think the composition is pretty good. Its impossible to have a bush landscape without it looking 'messy', but that doesn't mean messy is a bad thing in this context! Thats how bushland is! I just question the image's significance to viewers as a potential featured picture. To be honest, I don't really know whether that is a valid reason to oppose according to our guidelines, but I think it probably should be a factor, at least. Diliff | (Talk) (Contribs) 12:09, 3 April 2006 (UTC)
- Oppose - it just doesn't have the richness of colour that other featured pictures have; I don't think it's worth including. BigBlueFish 16:34, 6 April 2006 (UTC)
Please advise. :( pfctdayelise (translate?) 23:35, 1 April 2006 (UTC)
- I don't know. However, if I understand what you're trying to do correctly, it can be made to work by using a numbered parameter, like this:
{{hidden|Kennedys hut|2={{Wikipedia:Featured picture candidates/Kennedys hut}}}}
- yields
[edit] Kennedy's Hut
Other version are availible here. (I kinda like the sepia effects)
- Support Self Nom. --Fir0002 www 23:00, 1 April 2006 (UTC)
- Oppose - good, but not great. Rather bland composition. -- P199 01:39, 2 April 2006 (UTC)
- I don't know - the washed sky and non-directional light gives a very depressing feeling...but I don't dislike that...but I don't know if I like it either. Why does it look like the bark has exploded off of the surrounding trees?--Deglr6328 02:32, 2 April 2006 (UTC)
- neutral for now. the large tree is distracting. pschemp | talk 05:44, 2 April 2006 (UTC)
- Weak support version 2 Looks better in full size.
The blown-out sky doesn't disturb me, and it's unavoidable in this type of lighting - the hut is deep in shade, and the bright, cloudy sky is behind the trees.Apparently, it's not unavoidable - or is this a clever composite of two bracketed shots? --Janke | Talk 07:16, 2 April 2006 (UTC)
- OpposeThe sky is completely burned out. Also pic 02 looks better than this (at least no huge patch of burned out sky). --antilived T | C 09:26, 2 April 2006 (UTC)
- Oppose very messy Leidiot 09:46, 2 April 2006 (UTC)
- Oppose doesn't grab the attention. --BillC 10:16, 2 April 2006 (UTC)
- Neutral. I disagree with a lot of the other opposing reasons though. I think the composition is pretty good. Its impossible to have a bush landscape without it looking 'messy', but that doesn't mean messy is a bad thing in this context! Thats how bushland is! I just question the image's significance to viewers as a potential featured picture. To be honest, I don't really know whether that is a valid reason to oppose according to our guidelines, but I think it probably should be a factor, at least. Diliff | (Talk) (Contribs) 12:09, 3 April 2006 (UTC)
- Oppose - it just doesn't have the richness of colour that other featured pictures have; I don't think it's worth including. BigBlueFish 16:34, 6 April 2006 (UTC)
- Help:Template says that a parameter cannot contain }} so in particular templates cannot be nested. But this is apparently not the whole story. Is the work-around good enough for your purposes? I'm not sure it works in all cases. -- Jitse Niesen (talk) 06:12, 27 April 2006 (UTC)
-
- Man, so easy to fix, thankyou! It's pretty much exactly what I want to do. I'll test it out and see how it goes. Thanks! pfctdayelise (translate?) 07:25, 27 April 2006 (UTC)
[edit] Limitations
Note that this template, 'hidden begin', and the 'NavFrame' methodology in general do not work in all Wikipedia 'skins', for users with non-CSS browsers browsers and screen readers, or on mirrors and foreign language versions which have not copied the MediaWiki:Monobook.css classes. In all such cases the user sees the full output all the time with no 'show/hide' feature. --CBDunkerson 11:22, 27 April 2006 (UTC)
- Oh, is that the problem? I will edit Cologne Blue to fix this. Ashibaka tock 22:51, 4 May 2006 (UTC)
- I can't get it to work... Ashibaka tock 22:58, 4 May 2006 (UTC)
- You need relevant js from MediaWiki:Monobook.js also. →AzaToth 05:24, 5 May 2006 (UTC)
- Okay, currently MediaWiki:Cologneblue.js isn't actually loaded anywhere, but I added it to User:Ashibaka/cologneblue.js. Ashibaka tock 14:59, 5 May 2006 (UTC)
- You need relevant js from MediaWiki:Monobook.js also. →AzaToth 05:24, 5 May 2006 (UTC)
- I got it working on a custom skin by adding this line to Skin.php in method getHeadScripts under the $r= line that looks just like it and before the if statement:
$r .= "<script type=\"{$wgJsMimeType}\" src=\"/index.php?title=MediaWiki:DSS.js\"></script>\n";
- DSS is the name of my skin and i inserted the jscript into MediaWiki:DSS.js. There is probably a more elegant way. Let me know if this doesn't work, i wrestled for a while and wasn't controlling variables so there may be some other edit i made somewhere else that enabled it. Oh, that just covers the js side of the template, the css i just appended to the end of my skin's copy of main.css. Thanks a lot Gro.ikiwaidem 22:55, 3 November 2006 (UTC)
[edit] Expand all for printable pages
Is there a way to expand all hidden text for printable pages, but hide them all for regular pages? -- Sy / (talk) 01:32, 10 May 2006 (UTC)
[edit] Bug
Every template that uses this one demonstrates not entirely correct behaviour. It shows "Hide" by default and when you click it nothing happens, but the button changes to "Show". When you click it the second time the hidden content finally shows up. Is there a way to fix it? This seems to be fairly recent change. Grue 11:34, 17 May 2006 (UTC)
- This problem was caused by my edit which inserted optional CSS styles to it. The Javascript apparently depends on a particular style, so that it assumed from the extra characters that the content was currently visible. Clicking the show/hide button the first time thus cleared the extra characters. I've reverted my changes; sorry for the long delay, but I was without Internet access for a while. // [admin] Pathoschild (talk/map) 15:28, 23 May 2006 (UTC)
-
- Close, but it's a JavaScript variable problem. Currently the bug occurs if there are 1 or 2, but not more, NavFrames on a page. Working on it. BenB4 01:15, 23 July 2007 (UTC)
[edit] Practical interference on AfD pages
This template is not working correctly on AfD nominated pages and its intrusiveness literally affects the outcome. I have brought this up with the {{afd1}} group, but they appear not to have the bug. If this could be made to work universally on all mediawiki skins it would be great, but until then could there be a note somewhere that it doesn't work currently and to restrict usage to non-essential purposes. Thanks, Ansell 02:40, 2 June 2006 (UTC)
[edit] Default to show
Can I set this up so it will default to showing, and then people can hide the text? (Like the TOC box) --michael180 21:58, 17 June 2006 (UTC)
Anyone? --michael180 15:15, 24 August 2006 (UTC)
- Sorry to see no-one's ridden to the rescue, Michael; I don't know whether or not this is possible, but in lieu of anyone else responding, something that might be worth trying is to visit some of the pages using this template to see if/when/how they achieve a default setting of show. If you find one, please list it here! Meanwhile, it'd be useful to know whether or not it's possible to set TOC contents to hidden...
- Hope you find a result one way or another, David Kernow 19:00, 24 August 2006 (UTC)
- Update: Take a look at {{Ukraine topics}}, which was displayed as shown when I arrived at Subdivisions of Ukraine. It uses an HTML-based method to implement show/hide which looks as if it can meet your case. Best wishes, David 20:42, 24 August 2006 (UTC)
-
- Ah, I found what affected this behavior. In the wikibits javascript there is a statement which says that boxes should be auto hidden if there is more then 1 of these boxes. This number can be changed, if you happen to have access to the javascript file (so if you run your own wiki, you can change this). There seems to be no way to change this on a case by case basis. The {{Ukraine topics}} example was auto shown because it was by itself. However, go to a page where it was included with other show/hides (eg. the page Ukraine), the box will be automatically hidden along with the rest. I think we need a smart developer to let this show/hide thing be controlled on a case by case basis. I will ask at the Wikipedia:Village pump (technical) --michael180 23:30, 1 September 2006 (UTC)
- Update: The following line added to User:USERNAME/monobook.js makes the boxes default to open, if there is less then 999 of them on that page. However, this only affects you, and does not control the boxes individually. --michael180 00:33, 2 September 2006 (UTC)
NavigationBarShowDefault = 999;
-
-
- Thanks for the insights. "...a statement which says that boxes should be auto hidden if there is more then 1 of these boxes" seems somewhat arbitrary, but perhaps it's an emergent limitation of the system. The "999" setting seems like a workaround... Yours, David 03:07, 2 September 2006 (UTC)
-
-
-
-
- Check Wikipedia:Village_pump_(technical)#Template:Hidden_-_Auto_Show.2FHide, User:CesarB came up with a fix and he will change the wiki js in a few days. Way to go, User:CesarB. --michael180 21:42, 2 September 2006 (UTC)
-
-
-
-
-
- I managed to derive a workaround for the "default to show" issue. I set the NavFrame id to 'show' or 'hide' and have modified the javascript code to handle this just before the id is changed to "NavFrame" + indexNavigationBar.
- My (modified) code for my own wiki (it ignores NavPic and uses left allowed arrows for expanding / contracting):
-
-
/** Dynamic Navigation Bars (experimental) *************************************
*
* Description: See http://en.wikipedia.org/wiki/Wikipedia:NavFrame
*/
var strHide = '▼';
var strShow = '►';
function toggleNavigationBar(indexNavigationBar) {
var NavToggle = document.getElementById('NavToggle' + indexNavigationBar);
var NavFrame = document.getElementById('NavFrame' + indexNavigationBar);
if (!NavFrame || !NavToggle) return false;
for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
if (NavChild.className == 'NavContent') {
NavChild.style.display = (NavChild.style.display=='none') ? 'block' : 'none';
}
}
NavToggle.firstChild.data = (NavToggle.firstChild.data==strShow) ? strHide : strShow;
}
function createNavigationBarToggleButton() {
var indexNavigationBar = 0;
for(var i=0; NavFrame = document.getElementsByTagName('div')[i]; i++) {
if (NavFrame.className == 'NavFrame') {
indexNavigationBar++;
var NavToggle = document.createElement('a');
NavToggle.className = 'NavToggle';
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
var NavToggleText = document.createTextNode(strHide);
NavToggle.appendChild(NavToggleText);
// Find the NavHead and attach the toggle link
for(var j=0; j < NavFrame.childNodes.length; j++) {
if (NavFrame.childNodes[j].className == 'NavHead') {
NavFrame.childNodes[j].appendChild(NavToggle);
}
}
switch (NavFrame.getAttribute('id')) {
case 'hide':
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
toggleNavigationBar(indexNavigationBar);
break;
default:
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
}
}
}
}
addLoadEvent(createNavigationBarToggleButton);
-
-
-
- And my NavFrames look like this:
-
-
<div class="NavFrame" id="show"> /* or id="hide" */ <div class="NavHead">Header goes here</div> <div class="NavContent"> Content goes here </div> </div>
-
-
-
- --210.23.133.248 02:07, 10 January 2007 (UTC)
- You might want to use collapsible tables, they can be nitially expanded or initially collapsed. Maybe a look at Wikipedia:NavFrame will be usefull too? --Rougieux (talk) 11:05, 19 January 2012 (UTC)
- I have made an edit request to add an 'expanded=yes' option, which matches template:hidden begin. Frietjes (talk) 18:50, 19 January 2012 (UTC)
- You might want to use collapsible tables, they can be nitially expanded or initially collapsed. Maybe a look at Wikipedia:NavFrame will be usefull too? --Rougieux (talk) 11:05, 19 January 2012 (UTC)
- --210.23.133.248 02:07, 10 January 2007 (UTC)
-
-
[edit] JavaScript
How was JavaScript added to a Wikipedia template? I looked at the source code, but couldn't find any JS code. I would love to create scripted templates like that! Please explain!
FLaRN2005 (talk) 17:17, 21 August 2006 (UTC)
- JavaScript cannot be added to a template. The JS code for this template is in MediaWiki:Monobook.js, whose contents are added to every web page (if the Monobook skin is used). See Help:User style for some more explanations. -- Jitse Niesen (talk) 05:26, 22 August 2006 (UTC)
[edit] position of the show link
Is there a way to put the 'show' not all the way to the right? Currently, I have an image on the right. and the 'show' link is on top of the image. I want the show to somehow be printed to the left of the image.
- This is possible with template:hidden begin. I will make an edit request to add an 'toggle=left' option, which matches template:hidden begin. Frietjes (talk) 18:54, 19 January 2012 (UTC)
[edit] Bug?
Did this template just stop working for everyone? Because none of them work for me on any browser whether I'm logged in or not. I noticed that MediaWiki:Monobook.js just got moved to MediaWiki:Common.js[1]. Does something there need to get fixed? Koweja 23:21, 21 November 2006 (UTC)
- Nevermind, it's working now. Koweja 00:55, 22 November 2006 (UTC)
[edit] Accessibility fix
Can someone modify the template so it provides a direct link to the page? That way if the show button doesn't work (because the page doesn't load properly or the user doesn't have javascript enabled) they can still see the page? Koweja 02:02, 23 November 2006 (UTC)
[edit]
Why does this template display hide when the content is hidden? This is only when I open the template page, after clicking "hide" it starts to behave normally. --Eleassar my talk 13:02, 18 January 2007 (UTC)
- Because, technically, it's fucked up. :) It has to do with a variable setting in MediaWiki:Common.js. The bug only appears if there are 2 or fewer NavFrames on a page. I am attempting a fix. BenB4 00:41, 23 July 2007 (UTC)
[edit] Style questions
The designer in me must ask: What is the purpose of this hide/show mechanism? What kind of content should be used for this? What problem does it solve and is it the best solution to that problem? hateless 20:10, 19 January 2007 (UTC)
[edit] Spoilers
Something with this functionality could be used for Wikipedia:Spoilers. --84.20.17.84 10:12, 22 January 2007 (UTC)
[edit]
{{editprotected}}
My bug fix was approved to Mediawiki:Common.js, so this page should be changed to:
<div class="NavFrame" style="border:none;"><div class="NavHead"
style="font-weight:{{{fw1|bold}}}; background-color:{{{bg1|transparent}}};
text-align:{{{ta1|center}}}; {{{headercss|}}}">{{{header|{{{1}}}}}} </div>
<div class="NavContent" style="font-weight:{{{fw2|normal}}};
background-color:{{{bg2|transparent}}}; text-align:{{{ta2|left}}};
display:none; {{{contentcss|}}}">{{{content|{{{2}}}}}}</div></div><noinclude>
{{/doc}}
</noinclude>
Thank you. ←BenB4 10:27, 8 August 2007 (UTC)
Done. Cheers. --MZMcBride 18:21, 8 August 2007 (UTC)
[edit] Transclusion of other templates
Is it possible to transclude other templates into the "content" section? If so, can somebody tell me how, because I've beem expirimenting all day with no success. MITB LS (t·c) 21:32, 29 August 2007 (UTC)
- It can be done like this, {{hidden|title|2={{template name}}}} Doctor Sunshine talk 16:52, 6 October 2007 (UTC)
[edit] Not rendering transcluded tables
When a transcluded page begins with a standard table, namely a page begins with "{|", that table's code is printed out instead of the actual table. When one adds some filler code in front of the transclusion it renders properly but I thought I'd mention it here. I'm not sure when this started happened but apparently the work around was not needed at some point. Here's a before and after (it's used at the bottom of the template under "statistics"). Thanks, Doctor Sunshine talk 16:52, 6 October 2007 (UTC)
- Anyone knows how to get the trascluded tables displayed correctly? - Thanks. 12:58, Oct. 16, 2007User:Guoqian —Preceding unsigned comment added by 129.176.151.6 (talk) 17:59, 16 October 2007 (UTC)
- It might have to do with the "|", which separates parameters in templates. Gimmetrow 01:21, 17 March 2008 (UTC)
[edit] I cannot see the "show" button
Take 2007 Writers Guild of America strike#Response for example. I run Internet Explorer 6 on Windows XP Professional. Thanks, –thedemonhog talk • contributions 05:01, 12 December 2007 (UTC)
[edit] Can we have graceful degradation?
When JavaScript is disabled and CSS is enabled, the content of those boxes which are initially hidden remains inaccessible. I think this can be fixed by adding the "display: none" using JavaScript, instead of having it in the style attribute. Is this reasonable? --Cameltrader (talk) 23:01, 22 March 2008 (UTC)
[edit] Default to expanded
I want to use the hide/expand function in a template, but I don't know how to default it so the template is expanded, and it shows the "hide" button when you first go to it. Uh, how do you do that? VolatileChemical (talk) 03:43, 14 June 2008 (UTC)
- I have made an edit request to add 'expanded=yes' to this template, which matches template:hidden begin. Frietjes (talk) 18:58, 19 January 2012 (UTC)
[edit] Overcoming some limitations
| a | b | c | d | e | f | g | h | ||
| 8 | 8 | ||||||||
| 7 | 7 | ||||||||
| 6 | 6 | ||||||||
| 5 | 5 | ||||||||
| 4 | 4 | ||||||||
| 3 | 3 | ||||||||
| 2 | 2 | ||||||||
| 1 | 1 | ||||||||
| a | b | c | d | e | f | g | h |
Botvinnik-Yudovich, USSR Championship 1933
After sacrificing a piece to expose Black's King, Botvinnik played 1. Bh5+ and Yudovich resigned as mate is inevitable, e.g. 1. ... Kxh5; 2. Ng3+ followed by 3. Qe4+ Rf4; 4. Qxf4#.
I wanted to show chess diagrams with the continuation hidden, and I came up with an adaptation of Template:Hidden for the diagram's caption that did what I wanted and as a by-product fixed some limitations of Template:Hidden -
- Uses multiple lines for header text that's wider than the available width, which in the example is the width of the diagram.
- Avoids over-writing "show"/"hide" if the header text is long or right-aligned.
Sorry about the lurid colour scheme, I wanted to show as many options in use as possible. The code for the diagram's caption area uses Template:Hidden as follows:
{{Hidden
| header = <p style="margin-right:5em; height=auto;
background-color: cyan;">Botvinnik-Yudovich, USSR
Championship 1933</p>
| content = After [[sacrifice (chess) | sacrificing]]
a piece to expose Black's King, Botvinnik played
1. Bh5+ and Yudovich resigned as mate is inevitable,
e.g. 1. ... Kxh5; 2. Ng3+ followed by 3. Qe4+ Rf4; 4. Qxf4#.
| headercss=height:auto;
| fw1=normal
| ta1=right
| bg1=yellow
| bg2=lime
}}
I think the remaining limitations are:
- In this case the caption created by using Template:Hidden is a little further below the diagram than a plain text caption would be.
- Template:Hidden's inability to default to show the content and display a "hide" link, which is apparently a limitation of the standard Javascript.
It's undesirable to require editors to code the additional HTML and CSS that this example uses. I could create a wrapper template that takes a plain text header and calls Template:Hidden with the specified text inserted into an HTML P tag, as in the example. Alternatively Template:Hidden could be made more generalised, which would mean adding some optional parameters and some conditional processing. Which approach do you prefer?Philcha (talk) 13:56, 16 June 2008 (UTC)
[edit] Within article text
I understand and endorse the use of this function in navigational templates, but why is it used in the body of articles? Increasingly, film and music articles are hiding awards and track listings under this template in the midst of article text. If scrolling lists
should never be used because of issues with readability, accessibility, printing, and site mirroring. Additionally, such lists may not display properly in all web browsers.
why does the same not apply to this template within the body of an article? Does it print and mirror correctly? It doesn't work in the printable version, for example, so why is text included in the body of an article if it can't be seen on the printable versions or mirrors? SandyGeorgia (Talk) 22:25, 22 August 2008 (UTC)
- Note:
{{hidden}}is currently used in 745 pages in the article namespace alone. --Lightsup55 ( T | C ) 22:54, 22 August 2008 (UTC)
- Another note:
{{hide}}(a redirect to Template:Hidden) is currently used in 0 pages in the article namespace alone. --Lightsup55 ( T | C ) 23:28, 22 August 2008 (UTC)
-
- I'm not questioning use in article namespace alone, since hidden navigational templates at the bottom of an article make sense, per WP:LAYOUT. I'm asking about hiding content in the prose, in the middle of an article. That content won't be viewable in printable version or on mirrors, so why should it be there? SandyGeorgia (Talk) 23:44, 22 August 2008 (UTC)
-
-
- Well yeah, YouTube doesn't use it directly because a screenshot of the website www.youtube.com is defined in the
{{Infobox Dotcom company}}template, however Elizabeth A. Smart uses the{{hidden}}template directly to show the "abduction timeline" (a list that defines what happened and when). --Lightsup55 ( T | C ) 23:53, 22 August 2008 (UTC)
- Well yeah, YouTube doesn't use it directly because a screenshot of the website www.youtube.com is defined in the
-
-
-
-
- Right. Elizabeth Smart provides an example of the application I'm questioning; I don't believe we should have hidden text in the middle of an article. SandyGeorgia (Talk) 23:55, 22 August 2008 (UTC)
-
-
-
-
-
- To take this from the top:
- "not in all web browsers" is a red herring. Some browsers are known to implement CSS incorrectly. Since there are free web browsers, may based on the Gecko (engine), whose CSS support is good and whose download sizes are only about 5MB, it's reasonable to expect that users will use good browsers.
- The printing issue can be resolved by fixing Wikipedia's CSS with a handful of statements in an
@mediablock. The most foolproof may be to move the rules that hide content (those that containdisplay:none) to an@media screenblcok, so that text is only hidden when the page is displayed on a screen. - As for mirrors, it's their responsibility to use appropriate CSS, which is not difficult.
- There may be an issue about screenreaders' rendering of text wrapped in a
display:noneblock but, if so, that's a defect in the screen readers and should be fixed by the suppliers.
- Elizabeth Smart is an interesting example. I'd prefer the article without the day-by-day itemisation of events, others might want it. How should that be handled? --Philcha (talk) 21:35, 6 January 2009 (UTC)
- To take this from the top:
-
-
FYI, I raised the question in mid-June 2009 at the village pump [2] and it didn't catch on. I'll bring it up again in a few months, after our law topics have developed further and the need for this system becomes more apparent (unless some new technology miraculously solves the problem.) Agradman appreciates civility/makes occasional mistakes 19:04, 25 June 2009 (UTC)
- I took a quick scan through this and see that one of the issues is with printing. This has been resolved: hidden boxes now expand when printing, unless they are classed as nonprintable, such as navboxes.
[edit] Accessibility
{{editprotected}} Please replace the page with the following:
<div class="NavFrame collapsed" style="border:none;"><div class="NavHead"
style="font-weight:{{{fw1|bold}}}; background-color:{{{bg1|transparent}}};
text-align:{{{ta1|center}}}; {{{headercss|}}}">{{{header|{{{1}}}}}} </div>
<div class="NavContent" style="font-weight:{{{fw2|normal}}};
background-color:{{{bg2|transparent}}}; text-align:{{{ta2|left}}};
{{{contentcss|}}}"> {{{content|{{{2}}}}}}</div></div><noinclude>
{{documentation}}
</noinclude>
This allows those who have JavaScript disabled to see the contents of the box, while still collapsing it automatically. Thanks. —Ms2ger (talk) 19:37, 3 November 2008 (UTC)
- Declining, as the description of the change does not seem to match the actual change. For example, it's getting rid of the category and some conditional "if" checks. There seem to have been some interim changes, so please re-check the code? Thanks, --Elonka 22:29, 4 November 2008 (UTC)
Already done by User:Happy-melon. Thanks. —Ms2ger (talk) 14:21, 9 November 2008 (UTC)
[edit] Cannot handle external links
The markup
- {{hidden|[http://www.chessgames.com/perl/chessgame?gid=1031833 Botvinnik-Yudovich, USSR Championship 1933]|After [[sacrifice (chess) | sacrificing]] a piece to expose Black's King, [http://www.chessgames.com/perl/chessgame?gid=1031833 Botvinnik played] 1. Bh5+ and Yudovich resigned as mate is inevitable, e.g. 1. ... Kxh5; 2. Ng3+ followed by 3. Qe4+ Rf4; 4. Qxf4#. | bg1=#def3bd}}
produces this:
{{{2}}}
{{ cite web}} works, but produces unwanted quotes round the title in both the caption and the hidden text:
After sacrificing a piece to expose Black's King, "Botvinnik played". http://www.chessgames.com/perl/chessgame?gid=1031833. 1. Bh5+ and Yudovich resigned as mate is inevitable, e.g. 1. ... Kxh5; 2. Ng3+ followed by 3. Qe4+ Rf4; 4. Qxf4#.
Can you please make {{hidden}} handle simple external links (e.g. Botvinnik-Yudovich, USSR Championship 1933) correctly in both the caption and the hidden text. --Philcha (talk) 08:13, 2 January 2009 (UTC)
- Yes we can:
-
{{hidden|header=[http://www.chessgames.com/perl/chessgame?gid=1031833 Botvinnik-Yudovich, USSR Championship 1933]|content=After [[sacrifice (chess) | sacrificing]] a piece to expose Black's King, [http://www.chessgames.com/perl/chessgame?gid=1031833 Botvinnik played] 1. Bh5+ and Yudovich resigned as mate is inevitable, e.g. 1. ... Kxh5; 2. Ng3+ followed by 3. Qe4+ Rf4; 4. Qxf4#. | bg1=#def3bd}} - —Ms2ger (talk) 15:20, 18 January 2009 (UTC)
[edit] Styling
{{editprotected}}
I'd like to be able to style the whole box, as opposed to the header and content areas. To make this possible, please change this line:
<div class="NavFrame collapsed" style="border:none;">
to this:
<div class="NavFrame collapsed" style="border:none; {{{css|}}}">
I believe this is a trivial change. Thanks. —Ms2ger (talk) 15:26, 18 January 2009 (UTC)
[edit] Show/hide functions in other wikipedias
I know I'm probably in the wrong section for this, but does anybody have any idea how to enable the show/hide function for Navboxes in another wikipedia. I'm currently an admin on the Manx language project and we've been trying for months to get the function to work but to no avail. If anyone could take a look at our .css and .js pages or give us some information on how to do it/who to contact about it, we would very much appreciate it. Regards, --MacTire02 (talk) 13:58, 11 February 2009 (UTC)
- Did anything come of this? I am in the same boat --Boy.pockets (talk) 23:41, 30 July 2009 (UTC)
[edit] Fixing automatic paragraph issue
{{editprotected}} Check out these two examples:
- Separated into paragraphs, as expected
1
2
3
- Not separated into paragraphs, but should be two paragraphs
1
2
Also,
- Bullet does not work
- Bullet
This fixes both problems by simply adding lines around the content. It doesn't actually change the spacing above or below the content, though. Also, see this. Gary King (talk) 09:00, 14 February 2009 (UTC)
- There's a sandbox for this template. Please use it to propose changes. Your oldid removes {{documentation}} and such. --MZMcBride (talk) 08:29, 20 February 2009 (UTC)
[edit] Question
Hello, I was wondering if it would be possible to tie several hidden templates together so that they open and close at the same time. For example, in the "men" and "women" tables here, would it be possible to make it so that all three hidden boxes in a row open at the same time? Thanks, Scorpion0422 21:32, 17 February 2009 (UTC)
- No, I don't believe that's possible. Also, in the docs, it says right at the top: There is no facility for collapse all or reveal all. Gary King (talk) 21:51, 17 February 2009 (UTC)
[edit] Hiding Sortable Tables
Hello all!
I was wondering if you could help me out ... I've been staring at this problem for a while now and can't seem to work out what I'm doing wrong. I'm trying to hide a sortable table ... can it even be done? Here's my code and what I'm getting;
{{hidden|Hide My Sortable Table|{|class="wikitable sortable" style="text-align:center;" !One!!Two!!Three |- |001||002||<span style="display:none">001c</span> |}}}
{
}
Thanks for your help and advice! --LookingYourBest (talk) 15:15, 12 April 2009 (UTC)
-
Title
| Table |
|---|
- See my example above, which is how you create a table inside a template. However, the way the code is parsed, it seems that the table code is forced outside of the hidden div anyways. Gary King (talk) 18:09, 12 April 2009 (UTC)
[edit] Default is SHOWN
The default on my local MediaWiki installation is to SHOW all text. Considering the comments above, this is pretty weird. Can anyone explain why this is happening? I've set up:
- the template as on this template page (copy/paste)
- MediaWiki:Common.js from
- Manual:Collapsible_tables and MediaWiki:Common.js (just the Dynamic Navigation Bars (experimental) bit)
- MediaWiki:Common.css from
- Manual:Collapsible_tables and
- prettytable class
Any ideas? MediaWiki version: 1.13.2 --Robinson weijman (talk) 16:01, 26 February 2010 (UTC)
[edit] Cut a chart in two with SHOW part
Hi, I'd like to cut the Template:Yakuza 3 Completion chart in two. the first part of the chart should be shown COMPLETIOn + SUB-SCENARIO while PSN TROPHIES til bottom chart should be hidden with a SHOW button. i tried "{{hidden|header=PSN TROPHIES|content=" with the ending "}}" coming later in the chart but it doesn't work. part is hidden but cannot be not displayed. any idea on how to solve this issue? thanks.Cliché Online (talk) 12:11, 3 March 2010 (UTC)
[edit] Box alignment
I've been fiddling with this:
{{hidden
| style = width: 14em;
| headerstyle = font-weight:normal; background:#add8e6; text-align:left;
| header = Abridged List of Birds
| css = margin-left:0; left-border:0;
| content = *[[Common Loon]]
*[[Western Grebe]]
*[[Blue-footed Booby]]
*[[Brown Booby]]
* etc.}}
which produces:
I'd like to see the left side of the box flush with the left side the "page". I can't see any margin or border and yet the box is offset. I tried {{{css}}} with no success and I can't see where it might inherent the style from. Any ideas. I'm kind of a newbie at this sort of stuff. –droll [chat] 01:24, 1 July 2010 (UTC)
- If you use FireFox, there is a plugin that will allow you to look at and fiddle with the attributes dynamically (as you see the web page). The plugin is called 'FireBug'. - sorry for not offering more specific help +( --Boy.pockets (talk) 04:44, 2 July 2010 (UTC)
[edit] Interwiki links:ru
Template:Hidden=ru:Шаблон:Скрытый (redirected ru:Шаблон:Hidden) Fractaler 15:22, 5 March 2011 (UTC)
[edit] Bold title
Is it possible to avoid the bold header, as in have a normal font style? McLerristarr | Mclay1 15:23, 25 May 2011 (UTC)
- The example in the section above uses normal font weight. Also:
{{hidden
| fw1 = normal
| header = An example
| content = *some stuff
*some more stuff }}
- some stuff
- some more stuff
For other valid font weights see this. –droll [chat] 18:27, 25 May 2011 (UTC)
-
- Thank you. I tried so many things but I didn't realise there was a separate "font-weight" thing. McLerristarr | Mclay1 12:31, 26 May 2011 (UTC)
[edit] Edit request on 19 January 2012
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please make this change to the template, which will allow for it to be expanded by default, if 'expanded=yes' is set. This matches the more fully featured {{hidden begin}} template. I plan to suggest more small feature tweaks to match that template later. thank you. Frietjes (talk) 18:48, 19 January 2012 (UTC)
- Done. Let me know if I broke anything. ;) Killiondude (talk) 05:56, 21 January 2012 (UTC)