Why are related items not deleted in their respective collections, once removed from the editor? #65
-
Lets say I have a collection called From the editor interface, I can only create new buttons (i.e. if I select the block, the drawer opens and I can populate the fields of the button collection). This effectively means that you cant reuse items from related collections; every item you create from the editor interface is single use (which is fine) So why is that, when I delete the button I just created from the editors state, the item in de related button collection is not deleted? There is no need for it to exist anymore. Or am I missing something here? Thanks for the great extention 💪 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you for your question! For selecting/reusing existing items have a look at … For deleting unused M2A items have a look at https://github.com/formfcw/directus-hook-library?tab=readme-ov-file#deleteunusedm2aitems — this is a script you can use in a custom hook extension. Let me know if you have more questions! |
Beta Was this translation helpful? Give feedback.
Thank you for your question!
For selecting/reusing existing items have a look at …
… #19 (comment)
… https://github.com/formfcw/directus-extension-flexible-editor?tab=readme-ov-file#tutorial-relation-node-with-existing-items (video)
For deleting unused M2A items have a look at https://github.com/formfcw/directus-hook-library?tab=readme-ov-file#deleteunusedm2aitems — this is a script you can use in a custom hook extension.
Let me know if you have more questions!