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.
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.
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,
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.
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);
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
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/
is working on a reply...