4

I am trying to import some categories from a CSV into Craft entries (a categories field). Everything else imports ok apart from the categories

I have created the categories in admin with the same name as the CSV categories but when I import nothing gets selected.

I have the categories formatted in one column in the CSV seperated with a comma .e.g "Branding,Marketing,Design," (I read somewhere this is how it can be done).

Any ideas anyone?

Thanks Malcolm

1
4

As per the docs...if you add config/feed-me.php to your project containing

<?php

return [
    '*' => [
        'dataDelimiter' => '-|-',
    ]
];

and format your CSV like

id,title,categories,city
17746,Imported title,Category 1-|-Category 2-|-Category 3,Bradford

should get you where you want to be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.