From 31945a9dab3584a4d3154ea63ac5d05b9ea0b33d Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 21 Oct 2016 15:49:03 +0000 Subject: [PATCH] The Foundry tag for FileStorageItem download link now looks for nav:attributes providing the file id etc to allow direct download from the list view of an item. To use this the attributes have been added to the list view XML by lines like the following: ((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "file.name"); ((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "file.id"); ((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "file.length"); Adjust the name of the object list as needed. git-svn-id: https://svn.libreccm.org/ccm/trunk@4397 8810af33-2d31-482b-a856-94f89814c4df --- .../lib/template-tags/content-items/fsi.xsl | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/fsi.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/fsi.xsl index 5eb1afed7..449453d1d 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/fsi.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/fsi.xsl @@ -97,6 +97,28 @@ then 'stream' else 'download'"/> + + + + + + + + + + + + + + + + + + + + + + @@ -105,20 +127,20 @@ '/cms-service/', $mode, '/asset/', - $contentitem-tree/file/name, + $file-name, '?asset_id=', - $contentitem-tree/file/id)"/> + $file-id)"/> + $file-id)"/> - \ No newline at end of file +