how do I report download paths for each attachment on each page?
I've created a report that displays various page content including attachments(s). I want to link directly to the attachment rather than viewpageattachments. I've tried many different supplier combinations in the report-on macro as well and the report-info macro as well as using report-link but I can't get anything to work. Here is my code currently (everything works except the download path for which nothing displays):
{table-plus}
{report-table}
{content-reporter:spaces=LDDU|type=news}
{date-sort:news:creation date|order=descending}
{content-reporter}
{report-column:title=title}{report-info:content:title|link=true}{report-column}
{report-column:title=Date|width=150px}{report-info:content:modification date|format=MMMM d, yyyy}{report-column}
{report-column:title=mod date}{report-info:content:modification date|format=dd MMM}{report-column}
{report-column:title=last edited by|width=15%}{report-info:content:modifier|link=true}{report-column}
{report-column:title=attachments|width=15%}{report-on:News:attachments}{report-info:attachments|link=true}{report-column}
{report-on}
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-link:attachment:download path}{report-info:title}{report-link}{report-column}
{report-on}
{report-table}
{table-plus}
thanks for your help
{table-plus}
{report-table}
{content-reporter:spaces=LDDU|type=news}
{date-sort:news:creation date|order=descending}
{content-reporter}
{report-column:title=title}{report-info:content:title|link=true}{report-column}
{report-column:title=Date|width=150px}{report-info:content:modification date|format=MMMM d, yyyy}{report-column}
{report-column:title=mod date}{report-info:content:modification date|format=dd MMM}{report-column}
{report-column:title=last edited by|width=15%}{report-info:content:modifier|link=true}{report-column}
{report-column:title=attachments|width=15%}{report-on:News:attachments}{report-info:attachments|link=true}{report-column}
{report-on}
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-link:attachment:download path}{report-info:title}{report-link}{report-column}
{report-on}
{report-table}
{table-plus}
thanks for your help
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hi Joseph,
I think that might be because the download path from an attachment is a relative URL (i.e. missing the http://...). You will need to add a prefix, see http://www.customware.net/repository/... for more info on how to do that.
Alternatively, unless you have a reason for displaying the full URL, I would normally go:
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-info:attachment:file name|link=true}{report-info}{report-column}
This will give you a link to the attachment with the file name as the link text.
Also noticed your {report-on} and {report-column} ending macros were swapped around, don't know if that's important.
Cheers,
Jen -
Inappropriate?Thanks Jen. I've now tried all of the below (plus other combinations) and still can't get the download path. Nothing at all shows up in the last three columns. I found that if I switch report-column and report-on in the first column, that column returns nothing as well.
{report-column:title=attachments|width=15%}{report-on:News:attachments}{report-info:attachments|link=true}{report-column}
{report-on}
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-info:attachments:file name|link=true}{report-column}
{report-on}
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-link:content:attachment > attachment:download path}{report-info:attachment}{report-link}{report-column}
{report-column:title=attachments|width=15%}{report-on:content:attachments}{report-link:attachment:download path|prefix=http://}{report-info:title}{report-li...}
{report-on}
I’m frustrated
-
Inappropriate?BTW, I don't really need the full URL, I just want to link directly to the attachment
-
Inappropriate?Hi Joseph,
I changed the order of some of your {report-on} macros and remove some redundant ones too. It seems to work for me so try this version:
{table-plus}
{report-table}
{content-reporter:spaces=CW32|type=news}
{date-sort:news:creation date|order=descending}
{content-reporter}
{report-column:title=title}
{report-info:content:title|link=true}
{report-column}
{report-column:title=Date|width=150px}
{report-info:content:modification date|format=MMMM d, yyyy}
{report-column}
{report-column:title=mod date}
{report-info:content:modification date|format=dd MMM}
{report-column}
{report-column:title=last edited by|width=15%}
{report-info:content:modifier|link=true}
{report-column}
{report-column:title=attachments|width=15%}
{report-info:attachments|link=true}
{report-column}
{report-column:title=attachments|width=15%}
{report-on:content:attachments}
{report-info:title|link=true}
{report-on}
{report-column}
{report-table}
{table-plus}
-
Inappropriate?Thanks James and Jen for all of your help. This code finally gave me what I was after:
{report-column:title=attachments|width=30%}
{report-on:content:attachments|separator=newline}
{report-link:download path}{report-info:title}{report-link}
{report-on}
{report-column}
1 person says
this answers the question
-
Inappropriate?For the record, the default link for Attachments has now changed to the 'download path' instead of the attachments page, as of 3.2.x. The above will have to be used for older versions.
Loading Profile...



EMPLOYEE
EMPLOYEE