Has anyone had any experience of migrating an entire site to use Vorto. I have been asked if it would be possible to migrate existing content into it but I guess data types like the grid would lose content is we just changed the data type on the document type properties.
If you are just wrapping Vorto around the current property editor's you could maybe update the doctype to use the new Vorto wrapped editor, then write some code to grab the old value (as this shouldn't have changed assuming no one has saved the page since the property editor changed) and wrap it in the vorto value e.g.
var property = yourContent.Properties.First(x => x.Alias == "newVortoWrappedProperty");
// Create empty vorto value
// You would have to create a copy of the VortoValue class as last time i looked it was private
var vortoValue = new VortoPropertyValue();
vortoValue.DtdGuid = new Guid(dtdGuid);
vortoValue.Values = new Dictionary<string, object>();
// Assign the old property value to your default language
vortoValue.Values.Add("en-GB", property.Value);
// Set the value as the new vorto wrapped value and save.
yourContent.SetValue("newVortoWrappedProperty", JsonConvert.SerializeObject(vortoValue));
I've used something similar on a sub set of properties and it worked okay.
Migrating entire site to Vorto
Has anyone had any experience of migrating an entire site to use Vorto. I have been asked if it would be possible to migrate existing content into it but I guess data types like the grid would lose content is we just changed the data type on the document type properties.
Thanks in advance
Hi Mike,
If you are just wrapping Vorto around the current property editor's you could maybe update the doctype to use the new Vorto wrapped editor, then write some code to grab the old value (as this shouldn't have changed assuming no one has saved the page since the property editor changed) and wrap it in the vorto value e.g.
I've used something similar on a sub set of properties and it worked okay.
Cheers,
Tom
Cheers Tom - this was really useful
is working on a reply...