Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Import Categories by Title #48

Open
metapublic-gbr opened this issue Feb 9, 2024 · 1 comment
Open

[FEATURE] Import Categories by Title #48

metapublic-gbr opened this issue Feb 9, 2024 · 1 comment

Comments

@metapublic-gbr
Copy link

I have the following usecase:
A table contains items that are assigned to different categories.
In the backend, one can download filtered items of the table as csv-file.
In column "categories", a commaseparated list of the titles of the respective categories will be listed.
Now, external editors shall, in my usecase, edit the csv-list and add or remove categories. Of course they will do it by adding or removing category-titles.
When re-importing the edited csv-file, import fails, because the importer needs a commaseparated list of category-uids.

My thoughts on a possible solution:

  • I could of course easily add this by forking the extension.
  • But maybe there is a more general solution that could be useful for others, too.
  • There will the problem that category-titles don't need to be unique. In my case, they are, but generally we don't know.
  • The same probably applies for other connected tables. Is there a good solution for that?
  • Or would a hook be the way to go? Manipulating the imported data just before the go into the dataHandler?

If you have a good suggestion, I could develop my code along this direction and hand it over to you as a pull request, as soon as it is working for me.

@calien666
Copy link
Member

I implemented a select feature versions ago, which didn't work properly, why we removed it. As you can see inside the code, there is a TCA Node View Helper, which should do the stuff and commented out HTML-Code in Resources/Private/Templates/DataSheetImport/Upload.html.
I didn't find the time fixing the issues with selects and build a version, which works, but I guess, this could be a first step for you seeing how we would handle these things. Feel free to work with this and if you think, this is a good solutin, feel free to do a pull request with the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants