[TYPO3-english] print friendly page extension

unclebyte unclebyte at gmail.com
Wed Mar 11 00:56:28 CET 2009


Andreas Burg ?????:
> Hi Doug,
> 
>> I'm looking at options for an extension that renders a printer 
>> friendly page.
> 
> it's easy without an extension. Create a new PAGE object with a new 
> typenum:
> 
> print = PAGE
> # put in your complete normal page
> print < page
> print {
>   # change typeNum to somewhat new
>   typeNum = 33
>   # override your css file
>   includeCSS.file1 = {$pfad}css/print_page_003.css
>   # remove some other unwanted headerdata if neccesary
>   headerData.997 >
> }
> 
> create an object for your link, f.e. with an icon:
> 
> lib.print = IMAGE
> lib.print {
>   file = fileadmin/pics/print.gif
>   imageLinkWrap = 1
>   imageLinkWrap {
>     enable = 1
>     typolink {
>       parameter.data = page:uid
>       # same as typeNum here
>       additionalParams =&type=33
>       addQueryString = 1
>       addQueryString.method = GET
>       title = Print-Preview
>       title.lang.de = Druck-Vorschau
>     }
>   }
> }
> 
> add this to your CoolUriConf.xml:
> 
> <valuemaps>
>   <valuemap>
>     <parameter>type</parameter>
>     <value key="print">33</value>
>   </valuemap>
> </valuemaps>
> 
> take a look into yaml manual about perfect configurating your page for 
> printing with css:
> http://www.yaml.de/fileadmin/download/release_31/ydoc_31_en_090120.zip
> german:
> http://www.yaml.de/fileadmin/download/release_31/ydoc_31_de_090120.zip
> 
In most cases will enough specify other css file with "media" parameter.
For example:
page{
   includeCSS {
     file1 = fileadmin/template/screen.css
     file1.media = screen
     file2 = fileadmin/template/print.css
     file2.media = print
   }

--
Dmitry Belousov aka UncleByte


More information about the TYPO3-english mailing list