Uniqueness of Title field of TitlePart not enforced

Topics: Customizing Orchard, Writing modules
Feb 7, 2013 at 2:43 AM
The editor for the Title field of the TitlePart has a hint that says:
"You must provide a unique title for this content item."

However, this rule does not seem to be enforced by the code.

If I were to enforce this, what would be the recommended way of doing it?

Is there any way to do it at the Handler level, where the handler checks the state of the model for validity, or anything like that? Or would I have to implement checks in both the Editor (POST) and Importing methods of the Driver, and then hope that no other code in the system sets the model to an invalid state?
Coordinator
Feb 10, 2013 at 7:26 AM
There is no reason why the title would need to be unique. The hint should be changed. Please file a bug.
Feb 10, 2013 at 7:29 AM
Thanks for your reply. I will file a bug about that hint.

The rest of my original question was hypothetical. Suppose I was trying to create a content part that has a value that should be unique (system-wide, or host-wide, or whatever). What would be the recommended way of doing this?
Coordinator
Feb 10, 2013 at 7:33 AM
Look at the autoroute part.