fetch file object by orginal filename?

Author Message

Oliver Dzierzon

Thursday 05 March 2009 2:27:28 am

Hello,

how can i fetch a file object by the <b>orginal filename</b> in my template. I need this because I have a download request from a external application. I'm using eZ Publish 4.01.

justin kazadi

Thursday 05 March 2009 3:22:54 am

Hi Olivier,

try this code

{$node.data_map.your_attribute_name.content.original_filename}

i think this can help you.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Oliver Dzierzon

Thursday 05 March 2009 5:16:24 am

Thank you, but that is not what I need.

My Problem is:

I have a ezPublish independent produkt database which I have included into eZ Publish with an extension. I have no possibility to alter the produkt database tables.

My extension returns a table where all products are listed. Now I want add a new column to the product list which contains a download link to a PDF file.

I thought I could do it in the following way:

For example there is an product called product1. Then I would create a link to product1.pdf.
For this PDF file I would create a new ez Publish file object. Now I don't know how to create the download template.

When my href to the download link should be like this:
index.php/de/content/download/225/2131/file/product1.pdf how can I get the parameters

225/2131/ although having only the orginal filename

 

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.