How to do print version of the page

Author Message

Zak dma

Wednesday 29 March 2006 6:08:14 am

I have node and template assignet to it. I want to have link like "print version" that display print version of that node. How to do this? What is the right way? Tnx.

J-A Eberhard

Wednesday 29 March 2006 6:42:11 am

Place something like this

<input src={"print.gif"|ezimage} class="print" border="0" onclick="window.print()" type="image">

in the template that override the /node/view/full.tpl for your content class.

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Präßler Sven

Wednesday 29 March 2006 6:48:40 am

If you want to display the node using the print_pagelayout.tpl then use

<a href={concat("layout/set/print/",$site.uri.original_uri)|ezurl} target="_blank">Print Version</a>

Zak dma

Wednesday 29 March 2006 7:04:56 am

Thanx a lot. But how could I know in template assigned to node that node is displayed in print version?

Bertrand Dunogier

Thursday 30 March 2006 4:54:53 am

No specific template is used for the print version of a page. The main change applied to the print version is the alternative pagelayout template, which is changed when you prepend /layout/set/print to your URL (see layout.ini for more details).

Other changes can easily be done using CSS.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Zak dma

Thursday 30 March 2006 5:37:17 am

What if the print-version very strongly differs from normal view?

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 22:35:39
Script start
Timing: Jan 18 2025 22:35:39
Module start 'layout'
Timing: Jan 18 2025 22:35:39
Module start 'content'
Timing: Jan 18 2025 22:35:39
Module end 'content'
Timing: Jan 18 2025 22:35:39
Script end

Main resources:

Total runtime0.0168 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9141152.6250
Module start 'layout' 0.00590.0033 740.539139.4609
Module start 'content' 0.00920.0051 780.000093.4297
Module end 'content' 0.01430.0024 873.429734.3047
Script end 0.0168  907.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003017.7535140.0002
Check MTime0.00148.3366140.0001
Mysql Total
Database connection0.00105.983110.0010
Mysqli_queries0.002716.043030.0009
Looping result0.00000.141910.0000
Template Total0.002012.010.0020
Template load0.00116.704210.0011
Template processing0.00095.209510.0009
Override
Cache load0.00084.613310.0008
General
dbfile0.00021.416680.0000
String conversion0.00000.061040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs