We have a Page with metadata for JS/XSLT/CSS and when the Page gets published, the underlying JS/XSLT/CSS too gets published. To publish the JS/XSLT/CSS, we are using engine.AddBinary()
.
We have an event extension that logs the published item information. When we publish the Page which we have described above, it is logging only the Page details and not the JS/XSLT/CSS details though they are getting published as part of Page publish.
We are using the code snippet as given below to get the processed items from the PublishTransaction
object. If the Page has any Dynamic Components inside Page's Component Presentations, then those Dynamic Components are available under ProcessedItems
object. However I am looking for CSS/JS/XSLT too in the list as they are getting published as part of the Page.
Example:
PublishTransaction transaction
IList<IdentifiableObject> items = transaction.Items;
foreach (IdentifiableObject item in items)
{
IList<PublishContext> publishContexts = transaction.PublishContexts;
foreach (PublishContext publishContext in publishContexts)
{
IList<ProcessedItem> oProcessedItems = publishContext.ProcessedItems;
foreach (ProcessedItem oProcessedItem in oProcessedItems)
{
....
}
}
}
Could you please help me in placing the correct API call to satisfy my requirement.