Copied to clipboard

Flag this post as spam?

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


  • Bilal Haidar 144 posts 410 karma points
    Aug 23, 2016 @ 07:59
    Bilal Haidar
    0

    How to package Document Types, Custom Sections, etc in one package?

    Hi, I am in the process of developing a custom application to be hosted inside Umbraco.

    How can I package all the source code, views, css, js, etc. in one package, whereby I can deploy on multiple installations of Umbraco?

    Also, will it be possible to create all Document Types, Templates, properties, etc by code, so that when I deploy package, everything will be installed and ready to use?

    Thanks

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Aug 23, 2016 @ 11:37
    Dan Diplo
    100

    You can create custom packages from the Umbraco Developer section. Just right click the Packages element and choose Create and follow the prompts. A package can contain everything you should need.

    See http://code-desk.com/web-development/how-to-create-local-package-in-umbraco-7.html

  • Bilal Haidar 144 posts 410 karma points
    Aug 24, 2016 @ 05:36
    Bilal Haidar
    0

    Thanks Dan.

    Is there a way by code to create Document Types, properties, partial views and macros and then package them?

    Regards Bilal

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Aug 24, 2016 @ 12:23
    Dan Diplo
    1

    Yep, you can package document types - this also automatically packages the associated template. You can also package up content (nodes) too.

    There is also then an option for selecting any arbitrary files or folders - and these will be added to the package, too. So you can package any files within your website (including partials etc).

  • Bilal Haidar 144 posts 410 karma points
    Aug 24, 2016 @ 13:01
    Bilal Haidar
    0

    Sorry Dan, I meant by code. For instance, I write some code using Umbraco services and create Document Types, etc.

    Thanks

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Aug 24, 2016 @ 13:10
    Dan Diplo
    1

    There is a packaging service you can access if you have an UmbracoContext. So you can access it like this:

    var service = UmbracoContext.Current.Application.Services.PackagingService;
    

    However, I've never used it myself.

    You might also want to check out Kevin Jump's uSync, which might do what you want, too:

    https://our.umbraco.org/projects/developer-tools/usync/

  • Jason Espin 368 posts 1335 karma points
    Aug 24, 2016 @ 13:13
    Jason Espin
    1

    You can also package the compiled .dll file for your application. This is the way I do my package releases. Alternatively, you can bundle your application code into App_Code although I would not recommend this.

  • Bilal Haidar 144 posts 410 karma points
    Aug 24, 2016 @ 17:59
    Bilal Haidar
    0

    Hi Jason, How can I connect with you by email? Thanks

Please Sign in or register to post replies

Write your reply to:

Draft