Hi,
I’ve been scouring the forums and API documentation to see if I could find an answer to this but I haven’t so thought I’d ask.
I have a page which contains nothing but a snippet call, the snippet produces a CSV export of data unique to the logged in user (not authenticated via modx, it’s our own back end). I would like to change the filename of the file produced but I am guessing that despite sending headers (using the PHP header command) they don’t seem to work, is this because modx is overwriting/re-issuing the content-disposition header with the alias of the document?
Is there any API functions (or other method) of setting the HTTP headers from a snippet??
Thanks
Simon
Worked perfectly, thanks. Although I had to use ob_end_flush() to stop my echo being discarded.