How does a package change in terms of "publishing a single page" and "Publishing a bundle with a single page"? Also, how does the package change when "publishing a bundle with a page AND a dynamic component"?
1 Answer
I don't think the package will have any difference, since you're still rendering a page or a DCP (there is a package instance for each rendering). If you need to render something differently based on this data, then you'll have to look at the PublishTransaction (accessible under engine.PublishingContext.RenderContext.PublishTransaction
) - the Items
property will contain the item that was sent to the publishing queue.
-
Oh! Is this the magic 'new' property that allows us to find the publish transaction from within the template without the 'dirty hack'? Is this 2013+ or 2011+? Commented Dec 30, 2014 at 13:02
-
-
1Just checked on 2013 GA and it works there too. Commented Dec 30, 2014 at 13:30