Copied to clipboard

Flag this post as spam?

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


  • Sean Dooley 289 posts 528 karma points
    Mar 27, 2012 @ 10:52
    Sean Dooley
    0

    Including Ucomponents as part of a custom package

    Looking to put together a custom package as a base for building Umbraco sites, and I would like to include Ucomponents as part of the custom package.

    How do I go about including Ucomponents as part of a custom package?

    Thanks for any help

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Mar 27, 2012 @ 10:58
    Lee Kelleher
    1

    Hi Sean,

    Good to hear that you'd like to re-use uComponents in a package!

    There are a couple of ways...

    1. Just include it.  But that runs the risk of clashing with other versions/installs of uComponents.

    2. Use ILMerge to bundle uComponents with your assembly. This is much safer, as the merged DLL is marked as "internal", so only accessible from your code/references.

    3. Forget about bundling it... and rip out any parts of the code that you want to re-use.  All the code is MIT-licensed, you have the freedom to do so.

     

    Looking forward to seeing what you come up with.

    Cheers, Lee.

  • Sean Dooley 289 posts 528 karma points
    Mar 27, 2012 @ 11:31
    Sean Dooley
    0

    Hi Lee

    Thanks for responding.

    I've tried the first method you've mentioned via the Umbraco Developer section and I came across the following challenge.

    I am using the Multi-Node Tree Picker whereby the Start Node ID is set to 1183.

    After installing the package, I get the error No node exists with Id '1183'.

    The ID for that node has changed as the content is getting re-created, therefore new ID's. Manually setting the Start Node ID after install resolves this. Suppose I could look at using an XPath Expression that would look for a particular DocType.

    Any other suggestions for resolving this?


  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Mar 27, 2012 @ 11:40
    Lee Kelleher
    0

    Hi Sean,

    Given that node IDs will be different between every Umbraco install, it is a safer option to go for an XPath expression to select the start node.

    Not sure what else you are packaging up... other doc-types, content nodes, etc?

    Cheers, Lee.

  • Sean Dooley 289 posts 528 karma points
    Mar 27, 2012 @ 11:45
    Sean Dooley
    1

    Hi Lee

    Packaging all doc-types, content nodes, data types, macros, etc. XPath expression would definitely resolve the above issue. Could possible replicate the Cultiv Razor Examples package, and zip/unzip the site.

    Thanks for your help Lee

  • 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