Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Ubuntu
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- DuncanKinnear - 26 Jan 2007

Answer

ALERT! 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

Change status to:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-02-02 - DuncanKinnear
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.