fast_content_csv_v03
Sample of csv file in attachment.
Module to import data from csv files
1. Save with code as a new module with name fast_content_csv
2. Copy file "data.csv" to your /assets/files/ folder
4. Change t_catalog and t_tovar to your value ( or set them to 1.)
5. Than just insert parent id and filename and push "Run"
p.s. You can use debug mode(debug=1) to run module without inserting data into Data Base
You can use delete param
Nice, in what order does de cvs needs to be? and is it also posible to export to cvs?
If samebody had test my module, I an waiting for bug report.
And wish list
Hi, very interesting module, congrats!
I did not have a chance to test it, but I think the natural evolution of this would be to include in the CSV the whole set of controls found in the editing page for a document, i.e. published/cacheable, DocGroups, TVs, keywords..
-
MODX Staff
- 12,272 Posts
Excellent news SamZ ... this is a very handy module indeed. I hope to test soon. Thanks!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
This is very interesting.
The sample file seems very limited and the text is unreadable, is it possible for you to provide a more complete sample file with examples of all the fields supported, preferably in english please?
Thanks.
Cheers,
Andreas
-
☆ A M B ☆
- 24,524 Posts
I would put each field through $modx->db->escape(), and would also use trim() instead of the ereg_replace:
$parent_title = $modx->db->escape(trim($parent_title));
$page_title = $modx->db->escape(trim($page_title));