HELP: how to style printer friendly page

Author Message

Ole Brudvik

Wednesday 24 August 2005 6:42:58 am

Just managed to get printerfriendly pages. Bu we need to style them. How to do this.

Thanks alot!

Ole

Dominik Stoeppel

Friday 26 August 2005 3:03:33 am

hi,

I have copied \design\standard\print_pagelayout.tpl to my design folder and add <link rel="stylesheet" type="text/css" href={"stylesheets/print.css"|ezdesign} /> to the head. This is a copy of my normal css style; changed to printer friendly version.

In my articles etc. are some parts (comments ..)that should not be printed. So I add this to the print stylesheet :

.hideprint {
DISPLAY: none
}

Arround the parts not be printed in pages/templated I add :

<div class="hideprint">
.....
</div>

A link to change to print version in new window for example :

<a href={concat("/layout/set/print/content/view/full/",$node.node_id,"/")|ezurl}" target="_blank"><img src={"b_print.gif"|ezimage}></a>

Dominik Stoeppel

Friday 26 August 2005 3:11:44 am

another way could be :

<link rel="stylesheet" ....style.css" type="text/css" media="screen">
<link rel="stylesheet" ....print.css" type="text/css" media="print">

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:19:33
Script start
Timing: Jan 18 2025 11:19:33
Module start 'layout'
Timing: Jan 18 2025 11:19:33
Module start 'content'
Timing: Jan 18 2025 11:19:34
Module end 'content'
Timing: Jan 18 2025 11:19:34
Script end

Main resources:

Total runtime0.8425 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.1641152.6406
Module start 'layout' 0.00510.0025 741.804739.4766
Module start 'content' 0.00750.8334 781.2813469.9531
Module end 'content' 0.84090.0015 1,251.23448.1250
Script end 0.8425  1,259.3594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3850160.0002
Check MTime0.00130.1551160.0001
Mysql Total
Database connection0.00090.105510.0009
Mysqli_queries0.795794.4485570.0140
Looping result0.00050.0621550.0000
Template Total0.809796.120.4048
Template load0.00220.257720.0011
Template processing0.807595.842220.4037
Template load and register function0.00020.027810.0002
states
state_id_array0.00120.142610.0012
state_identifier_array0.00250.299220.0013
Override
Cache load0.00170.1985230.0001
Sytem overhead
Fetch class attribute can translate value0.00080.092520.0004
Fetch class attribute name0.00240.284230.0008
XML
Image XML parsing0.00040.047720.0002
class_abstraction
Instantiating content class attribute0.00000.001330.0000
General
dbfile0.00060.0724100.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs