1
votes

Problem

I'd like to be able to get Sitecore Item's Publishing Settings by version to check whether a version is publishable or unpublishable.

Supporting Details

This can be viewed in Sitecore by navigating to the item, clicking the Publish tab, clicking the Change to view the Publishing Settings, and then in the Versions tab, checking whether the current version is publishable or not.

enter image description here

Attempts

I can get the item tab's publishable value, but not the version's.

(get-item -Path "master:/sitecore/content/...path to item").Fields["__Never publish"]

I've also looked through the available fields and done some searching, but can only find the item's publishability.

1

1 Answers

4
votes

Look for __Hide version field, it controls an item version publishing. If its value for a certain version is 1 then that version will be prevented from publishing, if it doesn't have any value / empty then the version will be published as usual.

Also, note that __Valid from and __Valid to fields are responsible for the version publishing.