I have a requirement to skip publishing of pages or components if the same is already been published to that target. Am trying to write some logic in resolver to achieve this. Any help is appreciated.

  • 1
    I've answered below, but next time to avoid the risk of not getting good answers or being downvoted for not showing any effort on your own behalf do state in your question what you've tried :) cheers – Nickoli Roussakov Jul 10 '14 at 5:43

Yes. Here you go:

    public void Resolve(IdentifiableObject item, ResolveInstruction instruction, PublishContext context, col.ISet<ResolvedItem> resolvedItems)
        //... do your logic
        Page p = item as Page;
        bool isPublishedToCurrentTarget = PublishEngine.IsPublished(p, context.PublicationTarget);
        //... do more of your logic
| improve this answer | |

Your Answer

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

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