Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Allow non-unique content type names

Vote:
 

In a multi site solution, I want to have several different ArticlePage content types, for different parts of the site. They could be separated by namespaces, like so:

  • MySolution.Models.PageTypes.SiteA.ArticlePage
  • MySolution.Models.PageTypes.SiteB.ArticlePage

And I would also give them unique GUIDS in the [ContentType] attribute.

As long as the GUID is unique, I should be allowed to create multiple content types with the same name instead of Episerver giving me "ArticlePage(1)" that I can't properly translate with my language files.

Controllers should be fine, as PageController has T where T : PageData.

So I guess those who would be left behind here are those who do not assign GUIDs to their content types in code. Which they should. Maybe run some sort of "ValidateAllContentTypes" to check for duplicate names etc as part of initializing, and throwing an appropriate error if you have (duplicated names AND Guid == null) on both of them?

#144954
Feb 23, 2016 11:08
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.