November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi, to answer the first part content ID and content GUID.
Content ID is not unique between systems. If you create two pages in your development environment you can notice that the content ID is sequential. First page content ID might be 150 and second 151. So the content ID most likely would clash between systems.
Content GUID on the other hand is "globally unique identifier" so it will not clash between systems (https://blogs.msdn.microsoft.com/oldnewthing/20080627-00/?p=21823).
Thanks for the response.
I would like to show contentguid for editors on a block editorial screen. content fields like ID, Name, Languages and Visible to are displaying by default for editors. if i want to show contentguid, what's the besy way to display contentguid like other fields ?
Hey, Suresh
Were you ever able to figure this out?
I need to show the GUID too.
Thanks,
Kris
Hi,
I was able to do this by using SetDefaultValues() like this:
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
UniqueId = ContentGuid.ToString();
}
and on the content type I have a property UniqueId:
[Display(GroupName = Global.GroupNames.Content, Order = 0)]
[Editable(false)]
public virtual string UniqueId { get; set; }
Only downside is that this will set it only when creating a new content, but you can propably write a scheduled job or something to update UniqueId on existing content items if needed.
Hi,
I would like to show contentguid field along with other fields (ID, Name, Languages and Visible to) on blocktype editorial screen.
When i import and export the contents from one environment to another environment, the content ID has changed but content guid remains same across both the environments.
Could someone please guide me to know if there is anyway contentguid can be added on the editorial screen along with other fields ? is there any specific reason for having content ID same and guid different during import and export from one to another environment ?
Thanks & Regards,
Suresh