Novice question

Author Message

François Xavier Lacroix

Monday 20 June 2005 2:03:43 am

Hello,
I want to show a list of file, but i can't see the attribute to get the path of the file.
I have tried :
{$currentDocument.data_map.file.content.original_filename}
{$currentDocument.data_map.file.content.filepath}
But it is not the good adress which seem to be something like:
http://administration.richelieufinance.com/index.php/content/download/361/2346/file/proposition.pdf

Thx in advance...

Leonardo López

Monday 20 June 2005 7:41:22 am

Hello Fran, how i can do to show a node in a specific table of the pagelayout. Wich command or operator i have to write to display a node? If you can help me I am grateful for it to you.

Daniel Beyer

Monday 20 June 2005 3:12:01 pm

Hi,

you can try that:

{let attribute=$currentDocument.data_map.file}
<a href={concat( 'content/download/', $attribute.contentobject_id, '/', $attribute.id, '/file/', $attribute.content.original_filename|urlencode )|ezurl}>{$attribute.content.original_filename|wash( xhtml )}</a>
{/let}

Or just use the attribute_view_gui:

{attribute_view_gui attribute=$currentDocument.data_map.file}

The attribute_view_gui will use the template you can find at /design/standard/templates/content/datatype/view/ezbinaryfile.tpl
(as long you have not copied this template into another design or make use of an override-template).

Of course, if the attribute is of an other datatype the accordant template will be used. I would prefer the attribute_view_gui over the first suggestion I made and use an override-template if I need an other output than the default one.

@Leonardo:
If you need to have the $node variable avalible in pagelayout (or an other place outside $module_result.content), you can place this code on the top of your pagelayout.tpl:

{default
pagelayout_node=fetch(content,node,hash(node_id,$module_result.node_id))
}

(...rest of the pagelayout.tpl...)

{/default}

Don't forget to close "default" again...
In $pagelayout_node will than be the same as in $node that is avalible in $module_result.content.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

François Xavier Lacroix

Tuesday 21 June 2005 3:04:03 am

Dani, thx a LOT !! you teach me something really useful :)

Daniel Beyer

Tuesday 21 June 2005 4:17:28 am

You're welcome, François.

According to the attribute_view_gui you might find this page useful - it's a list of avalible guis in eZp:
http://ez.no/ez_publish/documentation/incoming/appendices/appendix_f_ez_publish_template_functions

The list of avalible datatypes might be interesting, too:
http://ez.no/ez_publish/documentation/incoming/appendices/appendix_c_ez_publish_datatypes

And finally the operator list is always helpful:
http://ez.no/ez_publish/documentation/incoming/appendices/appendix_e_ez_publish_template_operators

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Leonardo López

Tuesday 21 June 2005 5:48:27 am

thank you very much Daniel.

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 01:13:37
Script start
Timing: Jan 19 2025 01:13:37
Module start 'layout'
Timing: Jan 19 2025 01:13:37
Module start 'content'
Timing: Jan 19 2025 01:13:38
Module end 'content'
Timing: Jan 19 2025 01:13:38
Script end

Main resources:

Total runtime0.8337 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0234152.6094
Module start 'layout' 0.00520.0029 741.632839.3984
Module start 'content' 0.00810.8243 781.0313618.8594
Module end 'content' 0.83240.0013 1,399.890616.2031
Script end 0.8337  1,416.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3727160.0002
Check MTime0.00130.1612160.0001
Mysql Total
Database connection0.00070.089610.0007
Mysqli_queries0.766191.8898680.0113
Looping result0.00080.0935660.0000
Template Total0.803296.320.4016
Template load0.00200.237820.0010
Template processing0.801296.101220.4006
Template load and register function0.00010.016410.0001
states
state_id_array0.00100.118810.0010
state_identifier_array0.00100.124320.0005
Override
Cache load0.00170.2032440.0000
Sytem overhead
Fetch class attribute can translate value0.00160.186530.0005
Fetch class attribute name0.00180.216080.0002
XML
Image XML parsing0.00130.159230.0004
class_abstraction
Instantiating content class attribute0.00010.0068100.0000
General
dbfile0.00090.1069220.0000
String conversion0.00000.000840.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs