Open giannik opened 5 years ago
It could be implemented. Should we also allow to attach to a different container? I'd say probably. So listing all containers that accept this type, plus an option to detach.
Yes, that would be perfect. Thank you.
On Thu, May 23, 2019 at 11:00 PM Sébastien Ros notifications@github.com wrote:
It could be implemented. Should we also allow to attach to a different container? I'd say probably. So listing all containers that accept this type, plus an option to detach.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OrchardCMS/OrchardCore/issues/3667?email_source=notifications&email_token=AALSLNIEDNN22IYBTEKQSS3PW3ZV5A5CNFSM4HN7A4V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDKNVQ#issuecomment-495363798, or mute the thread https://github.com/notifications/unsubscribe-auth/AALSLNML7SXXN3LSTJ6OWXDPW3ZV5ANCNFSM4HN7A4VQ .
See also https://github.com/OrchardCMS/OrchardCore/issues/2355 regarding add (or move really) existing content to list.
Detach is also a good option, but problematic if the child items aren't listable, as when detached they maybe be lost to the admin. So perhaps detach is disabled if child item is not listable?
Let's track the functionality of adding an item to a List Part here too. So, duplicated by https://github.com/OrchardCMS/OrchardCore/issues/5750.
When using listPart to create a parent child relation between content items , how does one remove the relationship ?
Inside ContainedPartDisplayDriver.cs there is this code that creates the relation :
if (await updater.TryUpdateModelAsync(viewModel, nameof(ListPart)) && viewModel.ContainerId != null) { model.Alter<ContainedPart>(x => x.ListContentItemId = viewModel.ContainerId); }
but how do you remove the parent child relation correctly ?