Forums / General / Novice question

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.

eZ debug

Timing: Jan 19 2025 12:53:26
Script start
Timing: Jan 19 2025 12:53:27
Module start 'content'
Timing: Jan 19 2025 12:53:28
Module end 'content'
Timing: Jan 19 2025 12:53:28
Script end

Main resources:

Total runtime1.3519 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.7734180.8594
Module start 'content' 0.00961.1937 769.6328623.9141
Module end 'content' 1.20320.1486 1,393.5469337.0938
Script end 1.3518  1,730.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.3329210.0002
Check MTime0.00160.1199210.0001
Mysql Total
Database connection0.00110.081010.0011
Mysqli_queries1.247592.27762050.0061
Looping result0.00220.16612030.0000
Template Total1.310696.920.6553
Template load0.00210.153520.0010
Template processing1.308596.792820.6543
Template load and register function0.00010.009810.0001
states
state_id_array0.00130.095010.0013
state_identifier_array0.00200.145620.0010
Override
Cache load0.00170.1281440.0000
Sytem overhead
Fetch class attribute can translate value0.00130.097840.0003
Fetch class attribute name0.00110.081980.0001
XML
Image XML parsing0.01020.756240.0026
class_abstraction
Instantiating content class attribute0.00000.0013100.0000
General
dbfile0.02051.5150330.0006
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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