Forums / General / How to do print version of the page

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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?