Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan Woulfe 447 posts 1664 karma points MVP 5x hq c-trib
    Jun 08, 2019 @ 11:07
    Nathan Woulfe
    0

    Getting pending value from ContentSchedule by variant

    Just looking for confirmation...

    A given IContent item can have a ContentSchedule (type of ContentScheduleCollection), which itself contains a list of ContentSchedule objects. From what I can tell, there should only ever be a maximum of two items in that list, per variant - one for Release, one for Expire.

    If the content item is variant, it's not possible to schedule all variants collectively, they must be scheduled individually but can have the same date set.

    I'm assuming old entries are cleaned up automatically.

    If I want to get the next Release/Expire date for a given variant, is it therefore safe to assume that calling .GetSchedule(variant, action) will return the next scheduled Release/Expire (or null if not set)? I shouldn't need to cater for multiple items and potentially filtering those to find the next pending scheduled action?

    Asking because that method returns an IEnumerable, which isn't necessary if it returns a single item. It is an overload (action is optional), in which case it could return both a Release and Expire ContentSchedule item. Hence my confusion...

    I think writing this has clarified it in my head, but wanted to make sure.

Please Sign in or register to post replies

Write your reply to:

Draft