Copied to clipboard

Flag this post as spam?

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


  • Mark Wemekamp 73 posts 385 karma points
    Jan 12, 2017 @ 17:10
    Mark Wemekamp
    0

    How should I insert initial content after installing a starter kit

    I'm wondering what is the best way to insert example data into the Umbraco content tree after installing a starter kit

    Is there a default way of doing this our should I write my own bootstrapper that does this for me?

    I've taken a look at the LocalGovStarter kit and StarterKitInstall class takes care of this by importing a xml file. Is this the way to go?

    Thanks in advance!

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Jan 12, 2017 @ 19:41
    Kevin Jump
    100

    Hi

    yes i wrote the import stuff inside the localgov starter kit because the standard content bits in the package manager don't quite work if you want to do anything complicated.

    if you are just importing some very basic (not linked) content then it will work fine.

    but if the content you are wanting to import has things like multi node tree pickers or page links in content then it's not going maintain those links when you import it - the code in the StarterKitInstall package does that for you.

    originally i just used uSync to do this, as you can call the api with those xml files and it will do all the importing and mapping as you go. but bundling the usync dlls with a public starter kit isn't ideal - because if the packages can be updated out of sync it causes issues (and i wrote both of them! )

    So if you are looking to import content that is linked, bootstrap it in code somehow (feel free to lift the localgov stuff) - but if it's just say a homepage and quick sample page, picking the content node when you create the package should work fine.

  • Mark Wemekamp 73 posts 385 karma points
    Jan 13, 2017 @ 07:31
    Mark Wemekamp
    0

    Hi Kevin,

    Thanks for the input, I will definitely check it out some more and build a poc to see if it suits my case

Please Sign in or register to post replies

Write your reply to:

Draft