Copied to clipboard

Flag this post as spam?

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


  • Jeremy Pyne 106 posts 246 karma points MVP c-trib
    Dec 31, 2012 @ 14:42
    Jeremy Pyne
    0

    Manually adding Courier Dependencies.

    I have created a custom property data resolver.  

    I have added a override to the PackagingProvider method.

    I am trying to add dependancies based on the items selected in the property.

    That is if they select two documents and a media item(Its a MultiUrlPicker property) I want to add those selections as dependencies to the docuemnt so that that will be deployed along with the document.

    But if I try item.Dependencies.Add in the property resolver it doesn't work. (Im thinking its becouse its adding the dependanceis to the property data not to the document but I dont know how to do this so it works as I need.

    Any sugessions?  Oh is there a way for me to access the document item from within the property packaging code.

  • Jeremy Pyne 106 posts 246 karma points MVP c-trib
    Jan 04, 2013 @ 14:41
    Jeremy Pyne
    0

    Oh, while as there was no suggestions.  after much more testing and time spend trying things i finnaly figured it out.  The following will add item directly to the que, not a dependency, but it will still add and deploy it.

     

                    CurrentItemProvider.ExecutionContext.CurrentPackaging.AddToQueue(new ItemIdentifier(guid, ProviderIDCollection.documentItemProviderGuid), false, 0);

    Now if i can just figure out how to check the current dependy selection(Self, 1,2,3, or all) so that I can just run the above code when dependencies are being deployed,
  • Per Ploug 865 posts 3491 karma points MVP admin
    Jan 11, 2013 @ 10:38
    Per Ploug
    0

    Hi Jeremy

    For further reference, there is a complete library of dataresolvers, open sourced here: 

    https://github.com/umbraco/Courier/tree/master/Providers/Umbraco.Courier.DataResolvers/DataResolvers

    They should pretty much all the things you can do with these resolvers. 

    Also, there are some more detailed docs on the data resolvers and how to build them here:

    https://github.com/umbraco/Courier/blob/master/Documentation/Developer%20Documentation/Data%20Resolvers.md

     

    /per

  • Seth Weiss 1 post 21 karma points
    Jan 14, 2013 @ 14:39
    Seth Weiss
    0

    Dependencies can be added but there is another way for it. the link provided in above reply helps to  get the basic idea of doing it.

    http://www.positivepest.com/

Please Sign in or register to post replies

Write your reply to:

Draft