File line or embed view?

Author Message

Glenn MacGregor

Thursday 21 October 2004 11:27:06 am

Hi,

I have an overridden template for the file class in my products section. My template contains

<div class="supportLinks">
{attribute_view_gui attribute=$content_version.data_map.file}
</div>

This is PDF file I am looking at. The {attribute_view_gui .... line prints a link to the file using its name and size. I have traced down where that actually gets printed, ezbinaryfile.tpl.

I want to change what that prints so I thought I would override the line view template specifing the file class and products section. This did not work so I tried to override the embed the same way, again this didn't work.

So what template does {attribute_view_gui attribute=$content_version.data_map.file} call?

Thanks

Ɓukasz Serwatka

Thursday 21 October 2004 2:25:37 pm

Hi,

You can use this

<a href={concat("content/download/",$node.object.data_map.file.contentobject_id,"/"
,$node.object.data_map.file.id,"/file/",
$node.object.data_map.file.content.original_filename|urlencode)|ezurl}>

{$node.object.data_map.file.content.original_filename|wash(xhtml)}</a>
{$node.object.data_map.file.content.filesize|si(byte)}

{$node.object.data_map.file.content.original_filename|wash(xhtml)} - file name

{$node.object.data_map.file.content.filesize|si(byte)} - file size

I hope this help

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

Main resources:

Total runtime1.0423 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.0073 587.9063152.6250
Module start 'layout' 0.00730.0046 740.531339.4453
Module start 'content' 0.01191.0287 779.9766528.5938
Module end 'content' 1.04070.0016 1,308.57038.1641
Script end 1.0422  1,316.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3160160.0002
Check MTime0.00130.1277160.0001
Mysql Total
Database connection0.00080.073510.0008
Mysqli_queries0.994895.4480540.0184
Looping result0.00050.0509520.0000
Template Total1.007296.620.5036
Template load0.00200.191920.0010
Template processing1.005296.445120.5026
Template load and register function0.00030.025310.0003
states
state_id_array0.00070.068810.0007
state_identifier_array0.00160.148820.0008
Override
Cache load0.00160.1543190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.048420.0003
Fetch class attribute name0.00110.103030.0004
XML
Image XML parsing0.00080.073520.0004
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00080.0812180.0000
String conversion0.00000.001440.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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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