- Published on
Adding a Disclaimer to TWiki Print format
- Authors
- Name
- Martin Andrews
- @mdda123
This is pretty hackish - but it seems to work Ok.
Putting your Disclaimers on the Bottom
Edit the variable WEBCOPYRIGHT
on the page TWiki.TWikiPreferences
. For instance, make the line read like this :
* Set WEBCOPYRIGHT = %MAKETEXT{"Copyright &(C)[_1] by PLATFORMedia LLC. " args="1999-%GMTIME{$year}%"}%
This has been prepared solely for informational purposes. It is not an offer, recommendation or solicitation to buy or sell, nor is it an official confirmation of terms.
Adding your Logo to the Top
Create a topic TWiki.WebTopBarPrint
which contains the logos required for the printable page (based on TWiki.WebTopBar
).
Also, so that the Print format includes the Logo at the top, edit the file twiki/templates/viewprint.pattern.tmpl
to contain :
%TMPL:INCLUDE{"viewtopbarprint"}%
near the top, and copy the file viewtopbar.pattern.tmpl
to a new copy viewtopbarprint.pattern.tmpl
which has the definition of TOPBAR changed to have %INCLUDE{"%TWIKIWEB%.WebTopBarPrint"}%
instead of the existing %INCLUDE{"%TWIKIWEB%.WebTopBar"}%
.
Also, to remove the background image behind the logo, change :
<div id="patternTopBar">
to :
<div id="patternTopBar" style={{'background-image':'none'}}>
and (finally) to get the logo to display on 'media=print' you'll need to comment out this section in twiki/pub/TWiki/PatternSkin/print.css
:
#patternTopBar,
#patternClearHeaderCenter,
#patternClearHeaderLeft,
#patternClearHeaderRight,
#patternTopBarContentsOuter {
display:none;
}
Forcing Printer Page-Breaks
Here's the code snippet you can litter on pages that print awkwardly :
<DIV style={{'page-break-after':'always'}}></DIV>