Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Idiot check required please.
I want to get the date a content page is scheduled to be published.
The .ContentSchedule property looks like the thing I need to use on IContent but I do not seem to have access to it.
I am using Umbraco 10.5.1.
Please can someone advise?
Hi Chris
It looks like the ContentSchedule property got removed from IContent, for performance reasons, but docs not updated!
https://github.com/umbraco/Umbraco-CMS/commit/14e1f7f7fcbb13ad83dd6215d1eab8d9a2efcdd8
(or at least if I'm reading it right!)
But your contentService should have a GetContentScheduleByContentId method, that I think you could use instead.
eg
IContent? contentPage = contentService.GetById(id); ContentScheduleCollection schedule = contentService.GetContentScheduleByContentId(id);
regards
Marc
Thanks Marc. That works for me. I am glad I am not going mad.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
IContent does not contain a definition for ContentSchedule
Idiot check required please.
I want to get the date a content page is scheduled to be published.
The .ContentSchedule property looks like the thing I need to use on IContent but I do not seem to have access to it.
I am using Umbraco 10.5.1.
Please can someone advise?
Hi Chris
It looks like the ContentSchedule property got removed from IContent, for performance reasons, but docs not updated!
https://github.com/umbraco/Umbraco-CMS/commit/14e1f7f7fcbb13ad83dd6215d1eab8d9a2efcdd8
(or at least if I'm reading it right!)
But your contentService should have a GetContentScheduleByContentId method, that I think you could use instead.
eg
regards
Marc
Thanks Marc. That works for me. I am glad I am not going mad.
is working on a reply...