Direct link to file

Direct link to file

Tuesday 11 August 2009 8:48:27 am - 3 replies

Modified on Tuesday 11 August 2009 8:55:30 am by Søren Knudsen

Author Message

Łukasz Serwatka

Tuesday 11 August 2009 1:26:15 pm

Hi,

embed-inline tag can work for you. Users can navigate, pickup a file as related object and embed it in the XML block as embed-inline element. Then make a tpl file for the File class (I assume it is a File class) which in embed-inline view will show as <a href="content/download/....">{$object.name|wash()}</a> In addition you can also pass custom parameters if you require any.

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/xml_tags#object_embedding

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

Damien Pobel

Wednesday 12 August 2009 7:04:10 am

Hi Søren,

I wrote an article about this topic in my blog :
http://pwet.fr/blog/creating_a_link_to_download_a_file_with_online_editor_in_ez_publish

It's a bit old with a screenshot of Online Editor 4 (ezdhtml) but it should work with Online Editor 5 (ezoe) with a few changes.

Cheers.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Søren Knudsen

Sunday 16 August 2009 11:58:21 pm

Thank you Łukasz. That did the trick. I had completely overlooked the posibility of inserting the object in for example an article, and not a link.

Damien: I forgot to mention that I had allready read your blog entry, but couldn't make it work. I succeeded adding the download class, but making the link_download.tpl template linking to the object's binary content was the problem.

Thank you both for helping out, anyway:)

You must be logged in to post messages in this topic!

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