Today I wanted to perform a render in Publish mode using the 2013 core service. I created a PublishInstructionData, a RenderInstructionData and a ResolveInstructionData and wired them all together correctly. I was able to set the RenderMode of the render instruction to "PreviewDynamic" and successfully call RenderItem on the core service.

However, when I changed "PreviewDynamic" to "Publish", invoking RenderItem gave the following error:

Specified argument was out of the range of valid values. Parameter name: renderMode.

This looks like an ArgumentException, which gives the impression that it's an intentional check. I have not been able to find documentation that indicates you can't use RenderItem in Publish mode, nor can I think of any reason why such a restriction should exist.

Is it possible to invoke a Publish render from the API? If so, how, and if not, why not?


1 Answer 1


If you call RenderItem with RenderMode.Publish it will reference all multimedia path relative to published site and you will get broken references also your DCPs will not be rendered when you are rendering a Page I think hence it is not allowed. However, if you really want to do it, I assume you can use TOM.NET to do it.

  • Well if you specify publish mode for your render, I'd rather hope it /would/ generate paths that are correct for the published site. Also - I wouldn't expect DCPs to be rendered as part of a page render. In page publishing, I'd expect the DCPs to be identified during resolving, and then rendered in their own right. It's not part of the page render is it? Commented Oct 8, 2013 at 7:51
  • 1
    If you look into ResolvedItem for a page with DCP and Embedded you will see that DCP are in the list of resolved item whereas embedded are not. So during publishing of the page the rendermode determines if the dcp is going to be rendered inline or not. Embedded are always rendered inline. DCPs are rendered inline when using preview mode.
    – Likhan
    Commented Oct 8, 2013 at 11:48
  • OK - so a preview render "fakes a broker retrieval" by rendering statically. Yet another reason to want to execute publish renders via the API. Commented Oct 9, 2013 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.