Design content type force file download with specified name

I am using the following in my Design parse file in order to force an asset listing to download as a .csv file:

     
     
    


The problem here is that it names the file <my page name>.csv. Is there a way that I could specify the filename? Such as the created date or even a name I specify?

Hi Nic,


Would you try Content-Disposition with content_type?



http://en.wikipedia.org/wiki/List_of_HTTP_header_fields



Just a thought I have not tested though.



Robin

Edit: typo fix

Isn't the page name something that you can specify? and if you wanted it to be the create date you could put a date in the page name. Or are you after something a bit more dynamic for other reasons?


I use this method to create csv downloads of asset listings a lot and sometimes need to use the listing to create a point in time download. I have a few elaborate and not so elaborate solutions depending on the desired outcome. But if control over the filename is all that is desired then changing page name is the method to use I would have thought?



Cheers

Shane

[quote]
Isn't the page name something that you can specify? and if you wanted it to be the create date you could put a date in the page name. Or are you after something a bit more dynamic for other reasons?



I use this method to create csv downloads of asset listings a lot and sometimes need to use the listing to create a point in time download. I have a few elaborate and not so elaborate solutions depending on the desired outcome. But if control over the filename is all that is desired then changing page name is the method to use I would have thought?

[/quote]



It needs to be more dynamic that that. I think I have another solution that will suffice for this.

[quote]
Isn't the page name something that you can specify? and if you wanted it to be the create date you could put a date in the page name. Or are you after something a bit more dynamic for other reasons?



I use this method to create csv downloads of asset listings a lot and sometimes need to use the listing to create a point in time download. I have a few elaborate and not so elaborate solutions depending on the desired outcome. But if control over the filename is all that is desired then changing page name is the method to use I would have thought?



Cheers

Shane

[/quote]



Shane, have you been able to build real Excel files using Matrix rather than just CSV files?

Hi Nic, yeah I have created multi tabbed xls files with asset listings. Aleks has a great tut on how to do it http://aleks.bochniak.net/postbox/mysource-matrix/outputting-excel-spreadsheet-xml


Cheers

Shane

[quote]
Hi Nic, yeah I have created multi tabbed xls files with asset listings. Aleks has a great tut on how to do it http://aleks.bochniak.net/postbox/mysource-matrix/outputting-excel-spreadsheet-xml



Cheers

Shane

[/quote]



Perfect! Thanks.