1

I want to get final published page HTML/Content using coreservice. I am using below code

it will give render content and then I got content using "Content" property of "RenderItemData" object.

but issue is my some image URL resolve while publishing(because code in PT) and using below code I will not get final url of images.

public RenderedItemData RenderItem(TcmUri tcmuri, string templateId, string targeturi, DateTime deployTime, bool includeChildPublications, bool includeComponentLinks, int maxNumberOfRenderFailures, PublishPriority publishPriority, bool rollbackOnFailure, ResolvePurpose resolvePurpose)
    {
        PublishInstructionData pubData = PublishInstructionData(includeChildPublications, rollbackOnFailure, deployTime, maxNumberOfRenderFailures, includeComponentLinks, resolvePurpose,RenderMode.PreviewDynamic);
        return mClient.RenderItem(tcmuri, templateId, pubData, targeturi);

    }

And when I tried to pass RenderMode as publish , it's start throwing an error. Can someone help me to solve this issue , How we can get the final published content(resolving path and everything) using core service

5
  • 1
    Why would you like to get published content using core service and why not odata service? What is your use case? – Hiren Kaku Jul 9 '15 at 4:36
  • Please update the question with the error you get with the render mode publish. – Saurabh Gangwar Jul 9 '15 at 17:00
  • @Saurabh Error: "Specified argument was out of the range of valid values. Parameter name: renderMode" – Bhagat Jul 9 '15 at 18:21
  • @Hiren nothing specific case but can we achieve this in core service. – Bhagat Jul 9 '15 at 18:24
  • 1
    Hiren asks a good question. The main reasons I'd suggest using the CoreService to get presentations would be for either testing or for some type of automated examples. Otherwise you're missing out on all that Content Delivery has already done. For reference, Dominic Cronin asked a similar, if not the same question. His use case was template testing, I believe. – Alvin Reyes Jul 10 '15 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.