Forums / Setup & design / Create a more attractive file link

Create a more attractive file link

Author Message

James Ward

Sunday 17 August 2003 7:54:32 pm

I am attempting to modify the file line view to allow the user to directly download the file without having to click through to the file full view.

Here is the current code:
{default content_object=$node.object
content_version=$node.contentobject_version_object}

<div class="listitem">
<p class="title">{attribute_view_gui attribute=$content_version.data_map.name}</p>
<div class="description">
{attribute_view_gui attribute=$content_version.data_map.description}
</div>
<p class="readmore">{attribute_view_gui attribute=$content_version.data_map.file}</p>
</div>

{/default}

I need to create a link to the file to so that users can also click the name to get to the file but I'm not sure how.

Thanks in advance.

working at www.wardnet.com
blogging at www.jamesward.ca

James Ward

Thursday 21 August 2003 8:24:01 am

OK. Maybe I wasn't specific enough with my question. I need a way to individually extract the url and the file size from a file object.

Rather just display the data_map.file I would like to surround text of my chosing in something like
<a href="{$content_version.data_map.file.url}">

Obivously that does not work but maybe it gives you a better idea of what I would like to accomplish.

There are other places where this comes up, such as the link class and object. I'm sure a solution for one will help me work with the other.

working at www.wardnet.com
blogging at www.jamesward.ca