Good afternoon, I have a migxdb implementation running very well, it has an option in the manager area to “Export Current View” to an CSV file.
It’s exporting the file but the columns titles at the top are the same names and order that the database, normally the names in the database had no spaces or are not complete, they are just references, the question is:
Is it possible to rename and change the order of the columns in the CSV file? (obviously not after it’s exported, just in case!).
Usually with MIGX you can customize the behavior by creating a custom processor. (Copy the default processor to the folder of your custom package and change the code).
For this, it’s either the “export” or “exportcsv” processor.
What Actionbutton are you using? “exportview” or “exportcsvmigxdb”?
Well just to inform that I solved my problem.
In my case it’s only 1 table I need to export so I followed @halftrainedharry advice and modified the existing processor, in this case was: core/components/migx/processors/mgr/default/exportcsv.php
It works just perfect. The order of the columns I did it directly modifying the table because I needed to add 1 extra field, so I just did it from there.