I'm using Component.IsPublishedInContext
to determine if the Component is published but the value returns true irrespective of the current TargetType
where the Component is being published to.
Example:
- Component is Published as a DCP to "Staging"
- Component is NOT Published to "Live"
Component.IsPublishedInContext
returnstrue
when being executed on "Live"
How do I figure out if the Component is published to "Live"?