Fetch Object Relation

Author Message

Softriva .com

Wednesday 07 February 2007 10:08:40 am

I created a class that have an Object Relation datatype. The relation is to pdf file. The attribute name is report_pdf. How can I make the link for people to download?

Xavier Serna

Friday 09 February 2007 1:39:33 am

Hi OOzy,

the link to the file itself could be made with an attribute_view_gui of the file attribute of the related object. In your case probably would be $node.data_map.report_pdf.content.data_map.file. You can modify the aspect of the link with an override of ezbinary.tpl datatype view.

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

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 19 2025 04:37:52
Script start
Timing: Jan 19 2025 04:37:52
Module start 'layout'
Timing: Jan 19 2025 04:37:52
Module start 'content'
Timing: Jan 19 2025 04:37:53
Module end 'content'
Timing: Jan 19 2025 04:37:53
Script end

Main resources:

Total runtime0.7533 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.0048 590.2656152.6250
Module start 'layout' 0.00480.0034 742.890639.4453
Module start 'content' 0.00820.7436 782.3359518.7578
Module end 'content' 0.75190.0014 1,301.09388.1719
Script end 0.7532  1,309.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3866160.0002
Check MTime0.00120.1597160.0001
Mysql Total
Database connection0.00070.092510.0007
Mysqli_queries0.712194.5309540.0132
Looping result0.00060.0761520.0000
Template Total0.725196.320.3626
Template load0.00190.252220.0009
Template processing0.723296.008320.3616
Template load and register function0.00020.024810.0002
states
state_id_array0.00080.101510.0008
state_identifier_array0.00070.087420.0003
Override
Cache load0.00150.201990.0002
Sytem overhead
Fetch class attribute can translate value0.00090.115620.0004
Fetch class attribute name0.00110.145230.0004
XML
Image XML parsing0.00180.244120.0009
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00200.2694160.0001
String conversion0.00000.001540.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs