Template talk:Hide in print

Merge
This should possible be merged with Noprint --Th e DJ (talk • contribs) 12:25, 1 March 2009 (UTC)


 * There isn't really any legit reason I can see to use - the noprint CSS class has no use outside of templates. --- RockMFR 21:00, 10 March 2009 (UTC)


 * I have done some testing of these templates and it seems TheDJ might be right. noprint works well and hides its content both when printing directly from the web browser, and when exporting as a PDF or book. While hide in print only hides its content when exporting as a PDF or book, which probably is not as useful.
 * Although it has one use: It is the exact opposite of only in print which only shows its content when exporting as a PDF or book. But now we have print version that supplies that "print vs. web" selection in a single template, so now we don't need as the opposite to.
 * If we are going to redirect to noprint then we must first check if there is any such   vs.  usage and change that to use print version instead.
 * --David Göthberg (talk) 03:09, 21 February 2010 (UTC)
 * noprint wraps it's argument in  tags. which is much different from generating no content at all, which "hide in print" does. "hide in print" also does not hide content when viewed as print version in your browser. They are very different templates. Schmir (talk) 09:58, 1 March 2010 (UTC)
 * I'll contact the devs to see if they have some insight to offer. Headbomb {{{sup|ταλκ}}κοντριβς – WP Physics} 05:04, 1 March 2010 (UTC)

Hides edit link bug
Template appears to suppress the edit link when it encloses a section. See the See also section of this Zeppelin article version.

Without the Hide in print wrapper, any printed book or PDF will include the unwanted See also section.

Is there a workaround or fix? 84user (talk) 08:13, 11 September 2009 (UTC)


 * I ran some tests, this happens when a header is inside parserFunctions and other such template code. It is a MediaWiki bug and not the fault of this template. Look at this code:


 * Here on this talkpage that renders this:


 * The above two headers get no ed


 * The above two headers get no edit section links. The strange thing is that when transcluding in a whole page, like we do in template documentation, then we do get edit section links no matter how much parserFunctions surround the transclusion.
 * I did a search on and found some bug reports that seems related to such header problems, and the devs seems to be working on it. But I didn't understand those bug reports and discussions so I am not entirely sure the devs are aware of this.
 * --David Göthberg (talk) 03:09, 21 February 2010 (UTC)


 * I found a solution. You can use  instead of this template when you want to hide a whole section. Then the section headers still get their edit links. Like this:

Header 3

 * I have applied this fix to the "See also" section of the Zeppelin article. Note that this means the section is now also hidden when printing directly from the web browser. (I have no point of view on when and if we should hide "See also" sections.)
 * Technical details:
 * When just hiding some words or a sentence use  instead, or this template. Since span tags don't cause new lines before and after themselves. But when hiding "block elements" such as tables, images, whole paragraphs or headings, then we must use div tags for HTML technical reasons. But if only hiding block elements but no heading, then this template can be used instead of the div tags.
 * --David Göthberg (talk) 13:34, 22 February 2010 (UTC)
 * Thank you for this analysis. These details should help me and others better understand template behaviour. I also looked at bugzilla but the details are somewhat beyond me. 21844 could be related. I am going to remove the markup around the See also in Zeppelin as I now think it's better to see it in print than have markup that must be confusing to an editor. I will leave a html comment linking here so that Hide in print could be re-instated when the MediaWiki bug is resolved. -84user (talk) 20:57, 24 February 2010 (UTC)

Possible Fix
Since the fix for Bug 45861 was activated, template based content omission in exports does not work anymore.

A possible fix would be to rewrite this template to

He!ko (talk) 10:20, 26 March 2013 (UTC)
 * That would make it identical to noprint, so might as well redirect then right ? —Th e DJ (talk • contribs) 23:26, 26 March 2013 (UTC)
 * Check my comment which links to the required resources for a work-around. Volker.haas (talk) 15:10, 4 July 2013 (UTC)


 * There should be a warning in the doc for this template that it is presently not functioning. Boud (talk) 23:36, 30 October 2013 (UTC)

Per above, please redirect this template to Template:Noprint. The functionality for this template has been removed years ago and there are no signs it will come back, while noprint works as documented at mw:Manual:Skinning (user:saper confirmed). --Nemo 08:35, 6 October 2014 (UTC)
 * Yes check.svg Done — Mr. Stradivarius  ♪ talk ♪ 10:10, 6 October 2014 (UTC)
 * This has since been reverted, as it broke table formatting that relied on the code  being the first thing that the template outputs. It looks like a proper fix will be more laborious than just redirecting. I've started the ball rolling at Templates for discussion/Log/2014 October 6. — Mr. Stradivarius  ♪ talk ♪ 13:44, 6 October 2014 (UTC)