Skip to content

Instantly share code, notes, and snippets.

@dfritschy
Created October 18, 2013 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfritschy/7038882 to your computer and use it in GitHub Desktop.
Save dfritschy/7038882 to your computer and use it in GitHub Desktop.
for Jérôme: site_xxx/design/xxx/override/templates/embed
{* File - List embed view *}
<div class="content-view-embed">
<div class="class-file">
{if $object.data_map.file.has_content}
{def $file = $object.data_map.file}
<div class="content-body attribute-{$file.content.mime_type_part}">
<a href={concat("content/download/", $file.contentobject_id, "/", $file.id, "/file/", $file.content.original_filename)|ezurl}>{$object.name|wash("xhtml")}</a> {*$file.content.filesize|si(byte)*}
</div>
{undef $file}
{else}
<div class="content-body">
<a href={$object.main_node.url_alias|ezurl}>{$object.name|wash}</a>
</div>
{/if}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment