Hi,
I want to unpublish documents according to a certain document value. I have a global event handler set up to do this, but I can only find how to do this under a workflow or using the "publish to" field.
Is there a way to do it immediately without using the publish to field?
Thanks
You could go into the listing view of the pages and use that interface. There isn't an unpublish, but there is an archive. Not sure if that works for you.
I did this in the end:
To unpublish:
node.SetValue("DocumentPublishTo", DateTime.Now.AddDays(-1)); node.Update();
To publish:
node.SetValue("DocumentPublishTo", null);
Please, sign in to be able to submit a new answer.