Question
I've built a little TWiki application that uses a customised
CommentPlugin forms to add flight/Car/Accommodation details to a travel itinerary.
It works really well, but I would like to be able to exclude the
CommentPlugin forms from the final printed version of the Itinerary.
Any idea how I can stop the forms appearing in the printable version of the topic?
Sorry, I couldn't find anything in the Docs about doing this.
Environment
--
DuncanKinnear - 26 Jan 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
First of all, confirm that it is actually printing.
PatternSkin includes a style definition in the
print style sheet (look for the ".commentPlugin" class) that should make comment boxes
not print. They
will show up in the "Printable" view but won't actually print. At least in theory...
If you're using a different skin, you could apply the same technique. That is, define a css class or id for your comment box and then set their display to "none" in the print version of the style sheet.
--
LynnwoodBrown - 26 Jan 2007
Lynnwood, thanks for your reply. Unfortunately the theory does not match reality.
I checked the print.css file in the pub/PatternSkin directory and it contains the following lines:
/* hide plugins */
.commentPlugin {
display:none;
}
But the
CommentPlugin form still appears in both the Printable view AND on the physical piece of paper that gets printed.
Any ideas why this might not work?
Thanks in advance.
--
DuncanKinnear - 01 Feb 2007
Interestingly, I tried printing this topic and the comment box does not appear when I do a print preview.
So maybe it has something to do with the fact that I have created a customised form for the plugin.
Can I assign the
.commentPlugin class to the fields within my form? Will that do it, you think?
--
DuncanKinnear - 01 Feb 2007
Or enclose your custom form tags within a div with class
commentPlugin...
--
LynnwoodBrown - 01 Feb 2007
Thanks. I went back to the
CommentPluginTemplate topic and noticed the
div around the standard prompt box. Once I did the same around my form table, it disappeared from the printout.
Thanks a lot for your help.
--
DuncanKinnear - 02 Feb 2007