Mark non-printable objects
Some items on the page should not be printed. For instance: broadcast messages, search input forms, and so on. A new
CSS class
twikiDoNotPrint can be used to identify those objects to be made invisible in the print style sheet.
--
Contributors: ArthurClemens - 10 Nov 2006
Discussion
I instinctivly disagree with this proposal. I'll try to work out why, but here's a start
- some twiki's may use BROADCASTMSG to make that the web is secret, or the state of the data, or some other thing we didn't think of
- why mix printing instructions into the non-print skins? wasn't that what the
print skin was created for?
or is this proposal to hide things that go into the print template, when in actual fact they shouldn't? in which case, it sounds a little like a hack, in which
%IF{'skin eq print'}% feels like it may be more appropriate.
right now I'm making too many guesses - Arthur, can you fill in more details please?
--
SvenDowideit - 10 Nov 2006
Perhaps my proposal was not clear. The print skin already hides a number of page elements: the left bar, the top bar. But the topic will always be shown. The proposal is to give elements in the topic the "do not print" CSS class so they will not show up in the print template. For example: the "modify search" form on the search results page just adds clutter to the print page and it can be removed when marked with class
twikiDoNotPrint.
( I have changed the name
twikiNoPrint to
twikiDoNotPrint)
--
ArthurClemens - 10 Nov 2006
The syntax
%IF{'skin eq print'}% cannot be used to conditionally display blocks of
HTML because any newlines will break the output.
--
ArthurClemens - 27 Nov 2006
I've been wanting to propose something like this myself in order to mark content that I put in the body of a topic which I don't want to print. One example would be a comment box. I would also like to format the edit links for MultiEditPlugin and EditTablePlugin to be hidden in print view.
--
LynnwoodBrown - 27 Nov 2006
Two interpretations of the goal
- Provide extension developers with the ability to easily identify aspects of their extension to result in rendered content that should not be printed when using the
printview template or a print skin.
- Provide a tag to the user to mark sections of the topic as not to be printed when using the
printview template or a print skin.
The former sounds like a great idea, and certainly, there are many elements introduced by extensions that should
not print, such as those highlighted by
Lynnwood. The latter is less obvious, and certainly should not involve just
CSS (it might require a
%STOPPRINT% and
%RESUMEPRINT% tag).
P.S. Note how again the change in pattern skin from
?skin=print to
?template=printview hurts the ability to reuse solutions across skins.
--
ThomasWeigert - 27 Nov 2006