Copied to clipboard

Flag this post as spam?

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


  • Marian 2 posts 72 karma points
    Sep 10, 2020 @ 14:56
    Marian
    0

    uSync Content Edition

    Hello,

    I want configure uSync Complete to skip property values of a content and synchronize just a content tree. Is there any way to do that?

    Thanks

  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Sep 10, 2020 @ 16:22
    Kevin Jump
    0

    Hi,

    You can't do it in config, but you could feasibly do that in code.

    if you wrote your own ContentHandler and ContentSerializer that inherit from the existing contentHandler and contentSerializer then you would only have to override the derserializeProperties method in the serializer to stop the properties from being saved into the content.

    Then you could alter the uSync8.config file to use your own custom content handler and it would not sync the properties.

    update: So your inhertited versions would be almost empty classes with constructors and the serializer would have a DeserializeProperties method that returned an empty list.

    So i think this would do it:

    override protected Attempt<List<uSyncChange>, string> DeserializeProperties(TObject item, XElement node, SyncSerializerOptions options)
    {
       return Attempt.Succeed(Enumerable.Empty<uSyncChange>());
    }
    
  • Marian 2 posts 72 karma points
    Sep 10, 2020 @ 20:39
    Marian
    0

    Thanks for reply Kevin, but how i should bind my custom composer and custom serializer?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies