Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Sims 119 posts 387 karma points
    Apr 20, 2016 @ 11:17
    Michael Sims
    0

    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

  • Tom Steer 161 posts 596 karma points
    Apr 20, 2016 @ 11:39
    Tom Steer
    102

    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.

    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.

    Cheers,

    Tom

  • Michael Sims 119 posts 387 karma points
    May 06, 2016 @ 10:09
    Michael Sims
    0

    Cheers Tom - this was really useful

Please Sign in or register to post replies

Write your reply to:

Draft