Copied to clipboard

Flag this post as spam?

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


  • Shaun 248 posts 475 karma points
    Jul 20, 2016 @ 15:34
    Shaun
    0

    Exporting node information from Umbraco 7

    I would like to include the ability to export all nodes of a specific doctype to either csv or excel/xml

    at the moment I'm not really fussed what format I export to. Aspose used to do a good job of this, but it doesn't seem to work with v7.

    Can anyone suggest how best I could go about building this functionality in v7?

    Just to clarify, I want export nodes of a specific doctype, along with all of their field data, e.g. if I'm exporting blog post nodes, I want to see the summary, date, body text, tags etc in the csv.

  • Alex Skrypnyk 5747 posts 21806 karma points MVP 4x admin c-trib
    Jul 25, 2016 @ 21:50
    Alex Skrypnyk
    0

    Hi Shaun,

    Did you find solution?

    I think the best way is to create your own controller for that, can't find any package with csv export feature.

    Thanks,

    Alex

  • Shaun 248 posts 475 karma points
    Jul 26, 2016 @ 09:10
    Shaun
    0

    Hi Alex

    I think you're right. I'm just reading up now on how best to "roll my own".

    The tricky bit seems to be how I can trigger my new controller from the umbraco backend.

  • Alex Skrypnyk 5747 posts 21806 karma points MVP 4x admin c-trib
    Jul 26, 2016 @ 10:20
    Alex Skrypnyk
    0

    Hi Shaun,

    You can add some button to Umbraco backend or link to your controller.

    Thanks

  • David Peck 589 posts 1557 karma points c-trib
    Jul 26, 2016 @ 09:28
    David Peck
    0

    A few ideas:

    1. Use LinqPad - however this is very buggy and I've had no success with it yet. http://shazwazza.com/post/using-linqpad-with-umbraco/
    2. uSync.ContentEdition - does the XML from that not work? https://our.umbraco.org/projects/developer-tools/usynccontentedition/
    3. If you're rolling your own then it should be very simple to request all content and all properties, and then output it with something like this CsvAction: https://gist.github.com/simonech/4104490
  • Shaun 248 posts 475 karma points
    Jul 26, 2016 @ 10:42
    Shaun
    0

    Thanks all

    I don't think I can use Linqpad oruSync as the exports need to be run by a user via the umbraco backend.

    Generating the export is the easy bit really, but I've not messed with adding new sections to the backend since it all went to Angular, so I'm not 100% sure how you do it.

  • Alex Skrypnyk 5747 posts 21806 karma points MVP 4x admin c-trib
    Jul 26, 2016 @ 14:11
    Alex Skrypnyk
    1

    Hi Shaun,

    You can create your own section, look docs - https://our.umbraco.org/documentation/extending/

    Or add your button where you want, where do you want?

    Thanks

  • David Peck 589 posts 1557 karma points c-trib
    Jul 27, 2016 @ 07:57
    David Peck
    100

    You don't need to create a whole new section, you can just add a dashboard control. They're as easy as creating a user control (.ascx - yes they still work somehow) with a button in it.

  • Shaun 248 posts 475 karma points
    Jul 28, 2016 @ 09:01
    Shaun
    0

    That dashboard control sounds just the ticket! I'll give that a go. Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft