Open chinasqzl opened 5 months ago
Please fill out the issue template (you can get it from here) fully, because I'm unclear on what your issue is about.
public class ContractPart : ContentPart{ public ContentPickerField Partner { get; set; } = new(); } public class ContractPartSettings { public string Type { get; set; } //Sale or Purchase }
When the contract is a purchase, the partner is the supplier content type, and when it is a sale, the partner is the customer content type, and now ContentPickerAdminController.SearchContentItems() can only get the parts, but it can't get the parts of which content type, and it can't read the ContractPartSettings, so you can't do pickers for more scenarios
Contract parts, when you make up two different content types of purchase and sales contracts, the selected partner is different, and you need to read the settings of the contract parts under the content type to extend the IContentPickerResultProvider
ContentPickerAdminController.SearchContentItems , Add the type parameter
public async Task
I think conceptually this is a similar issue to https://github.com/OrchardCMS/OrchardCore/issues/9444. I this for named/reusable parts?
It's not the same, adding a type parameter, mainly for the ContentPickerAdminController.SearchContentItems() you can get the settings in the part, and pass in the IContentPickerResultProvider.Search(), the part is composed of multiple content types, and the settings in the part are not different
Yeah, but isn't this something useful for named/reusable parts? Because GetPartDefinitionAsync(part).Fields
will be the same as GetTypeDefinitionAsync(type).Parts.FirstOrDefault(p => p.Name == part).PartDefinition.Fields
except for reusable parts.
That's right, you need to add the parameters of the technical name of the part
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
Contract parts, when you make up two different content types of purchase and sales contracts, the selected partner is different, and you need to read the settings of the contract parts under the content type to extend the IContentPickerResultProvider