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.