This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I need to set the default delimiter to ';' for all import/exports, however according to the documentation I just need to add the defaultFronmatOptions to my config_import_export.yaml like below
export:
title: Export Stuff
modelClass: Auth\Plugin\Models\Stuff
list: $/auth/plugin/models/stuff/columns_export.yaml
redirect: auth/plugin/stuff
fileName: 'stuff.csv'
defaultFormatOptions:
delimiter: ';'
enclosure: '"'
escape: '\'
encoding: 'utf-8'
Unfortunately it's still not working, the default delimiter is still ',' and forces admins to select custom format and place the delimiter themselves which is not ideal.
Is there anything I'm missing?
The indentation in your import/export config file is wrong... should be:
export:
title: Export Stuff
modelClass: Auth\Plugin\Models\Stuff
list: $/auth/plugin/models/stuff/columns_export.yaml
redirect: auth/plugin/stuff
fileName: 'stuff.csv'
defaultFormatOptions:
delimiter: ';'
enclosure: '"'
escape: '\'
encoding: 'utf-8'
Last updated
mjauvin said:
The indentation in your import/export config file is wrong... should be:
export: title: Export Stuff modelClass: Auth\Plugin\Models\Stuff list: $/auth/plugin/models/stuff/columns_export.yaml redirect: auth/plugin/stuff fileName: 'stuff.csv' defaultFormatOptions: delimiter: ';' enclosure: '"' escape: '\' encoding: 'utf-8'
Thanks, that worked. I just assumed it was an option of the export/import
1-3 of 3