This question about Topic Markup Language and applications: Answered
How do I omit certain table cols in print view?
Answer
You can do this with CSS and the
TablePlugin.
%IF{ "$ cover='print'" then="<style type='text/css' media='all'> .foswikiTableCol1 { display:none; } </style>" }%
The
IfStatement checks the url parameter
cover
. If it is set to
print
(this is how the print view works at least in
PatternSkin), one line of css code is injected into the topic making that column disappear in the print view. Alter the number in
foswikiTableCol1
to hide other columns (couter starts with 0).
This simple version applies to all tables on the topic. With some knowledge on CSS this can be easily restricted to single tables.
Example
%TABLE{id="Foo"}%
|*Head1*|*Screen-only*|*Head2*|*Head3*|
| 1 | 2 | 3 | 4 |
| 1 | 2 | 3 | 4 |
| 1 | 2 | 3 | 4 |
| 1 | 2 | 3 | 4 |
Head1 |
Screen-only |
Head2 |
Head3 |
1 |
2 |
3 |
4 |
1 |
2 |
3 |
4 |
1 |
2 |
3 |
4 |
1 |
2 |
3 |
4 |