Copied to clipboard

Flag this post as spam?

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


  • Damian Green 452 posts 1433 karma points
    May 12, 2014 @ 16:49
    Damian Green
    0

    Automated Export

    Hi,

    With uSync you can trigger the export from code with

    uSync.SaveAllToDisk()
    

    Is there a way to do the same with uSync content edition?

    Thanks

    Damian

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    May 12, 2014 @ 17:09
    Kevin Jump
    100

    Hi Yep,

    for a Content Export you need to export content and media

    ContentExporter cw = new ContentExporter(); 
    int contentCount = cw.ExportSite(false);
    
    MediaExporter me = new MediaExporter();
    int mediaCount = me.Export(); 
    

    this is the code behind the button on the UI https://github.com/KevinJump/jumoo.usync/blob/master/jumoo.usync.usyncui/uSyncTab.ascx.cs

  • Damian Green 452 posts 1433 karma points
    May 13, 2014 @ 11:23
    Damian Green
    0

    Thanks Kevin.

    I also had a quick look round the code and it doesnt appear like the usync folder is emptied before regenerating.

    I am using this in a build process im setting up so it feels right to clear the folder out before exporting everything.

    No issues with doing that is there? Cant think of any.

    Im thinking maybe on the lines of maybe someone created an item by accident and then deleted it. I don't want this item getting pushed to a staging server. So if i clear down before i export everything i will have a clean set of files.

Please Sign in or register to post replies

Write your reply to:

Draft