MODX3 Processor GetListProcessor to export dataset


I testing GetListProcessor to get a dataset to export.

		header("Content-Disposition: attachment; filename=".$name);
		header("Content-type: text/csv");
                return $csv;

but nothing happens.
In Console I can see data. but no download dialog is coming.

What do I made wrong?

Thank you in advance


My guess is, that you can’t use MODx.Ajax.request() for such a processor, but have to call it like this:

location.href = MODx.config.connector_url + '?action=MyExtra\\Processors\\MyProcessor&HTTP_MODAUTH=' + MODx.siteId;

ok, thank you.
so I need a connector to do this.

No (you can still use the MODX default connector MODx.config.connector_url), I just believe it doesn’t work with a XHR-request.

yes, thank you.

this runs.
very cool.

:pray: :pray: