Skip to main content
7 events
when toggle format what by license comment
Oct 18, 2016 at 15:28 comment added Vicent Galiana Hi Alan, Following Alex's comments I have investigated a bit more, and instead of checking the value of the field "never publish" wchi only check one of the restrictionsI'm doing this: $itemToCheck.Publishing.GetValidVersion($date,$true,$database) This line is checking the different publishing restrictions like, item level, version level, period and publishing target. (To be honest, the publishingtarget check is not working for me)
Oct 18, 2016 at 0:07 comment added Alex Shyba I would also add Workflow check and check for lifetime field values.
Oct 17, 2016 at 15:06 comment added Alan Płócieniak I extended my answer with details about excluding items with publishing restrictions. Hope that helps.
Oct 17, 2016 at 15:04 history edited Alan Płócieniak CC BY-SA 3.0
Answered extra questions from comments section
Oct 17, 2016 at 12:43 comment added Vicent Galiana This answers my original question (i'm testing it), but as @kasaku commented, the item may not be published due to publishing restrictions. Do you know how to include that check?
Oct 17, 2016 at 11:17 history edited Alan Płócieniak CC BY-SA 3.0
added 449 characters in body
Oct 17, 2016 at 11:11 history answered Alan Płócieniak CC BY-SA 3.0