1

Closed

Field settings are not unique per Type when they're attached to a Part

description

See http://orchard.codeplex.com/discussions/259747 for full history of this issue.

When a field is attached to a Content Part their settings are adjusted on the Content Type edit page. Sebastien has said that in this case "the settings are different per content type" but I'm not seeing this behavior.

When I add a field to a part and change the settings from the type editor page those settings are persisted between all types that have the part attached.

Steps to reproduce:
  • Add an Orchard Date/Time field to the Title Part.
  • Edit the Page content type and change the Display Option setting to Date Only.
  • Now edit the Blog Post content type, note that the Display Option is Date Only. Change it to Time Only.
  • Go back to the Page content type and notice that it is Time Only.
Closed Jun 20, 2012 at 7:54 PM by sebastienros

comments

BertrandLeRoy wrote Jun 15, 2012 at 4:51 PM

Actually I had misunderstood when you described the problem on the thread: if you attach the field to the Title part (or any random part) then yes, the settings are also attached to the part and not to a specific type. In order to get per type settings, you need to attach the field to a part that has the same name as the type (the part does not need to pre-exist or to have drivers and so on). I think this should be closed if you agree. Sorry about the misunderstanding.

gregslater wrote Jun 18, 2012 at 10:11 AM

Hi Bertrand. No problem, thanks for the update. Just wanted to check because Sebastien had suggested they are managed at type level on a per-type basis.

This issue can be closed if this is the expected behavior, but I think it might be more intuitive to render the field settings in the part editor instead of the type editor if they apply at the part level? I just think it might be a little confusing that the settings can be edited on each type but actually apply to the part, regardless of what it's attached to. What are your thoughts? Is it worth opening a new issue, or modifying this one?

Thanks, Greg.