How to hide part of article in printable version

Author Message

Ted Striker

Saturday 31 July 2004 7:44:57 am

Hello!

How can I hide part of an artcle when the main layout is printlaout.tpl and not pagelayout, obviously the part I need to hide is the print button :)

Is there anyway to know which templates has been executed?

Thanks!

Can you feel it Mr. Anderson? Closing in on you? Oh I can, I really should thank you after all. It was, after all, it was your life that taught me the purpose of all life. Purpose of life is to end.

Ole Morten Halvorsen

Tuesday 10 August 2004 1:25:37 am

Ted,

You can create your own stylesheet used when printing.
Example:

@import url({'stylesheets/print.css}|ezdesign(no)} print;

Now, in your article template add a <div> around your button or whatever you want to hide and in your print.css set the display property to none:

div.hidebutton { display: none; }

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

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 21:05:17
Script start
Timing: Jan 18 2025 21:05:17
Module start 'layout'
Timing: Jan 18 2025 21:05:17
Module start 'content'
Timing: Jan 18 2025 21:05:19
Module end 'content'
Timing: Jan 18 2025 21:05:19
Script end

Main resources:

Total runtime1.2136 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0391152.6406
Module start 'layout' 0.00500.0023 740.679739.4766
Module start 'content' 0.00731.2046 780.1563523.0938
Module end 'content' 1.21190.0016 1,303.25008.1250
Script end 1.2135  1,311.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2707160.0002
Check MTime0.00130.1051160.0001
Mysql Total
Database connection0.00080.063810.0008
Mysqli_queries1.164995.9912540.0216
Looping result0.00090.0761520.0000
Template Total1.182697.420.5913
Template load0.00210.176120.0011
Template processing1.180597.270220.5902
Template load and register function0.00020.018710.0002
states
state_id_array0.00090.076810.0009
state_identifier_array0.00340.281120.0017
Override
Cache load0.00170.1398160.0001
Sytem overhead
Fetch class attribute can translate value0.00070.061020.0004
Fetch class attribute name0.00100.086230.0003
XML
Image XML parsing0.00430.356920.0022
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00440.3609160.0003
String conversion0.00000.000540.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs