2

We are using a publishing Pages library with versioning and required checkout. When an editor makes changes to the page it is checked out and they get a warning at the top of the page that it is checked out to them.

enter image description here

However if another editor comes to the page they don't get any alert and if they select Edit from the menu it "pretends" to edit the page, but it won't really allow them to edit or save.

They could go to the Pages library and see that it is checked out, but it would be nice for editors to see from the page itself.

Is there something we can add to the page layout or masterpage that will show checked out/published status to editor/full control folks, but not show to read only folks?

I'm not having much luck searching for this because all the results just cover the basics of checking in/out and publishing.

1

We did this in the page layout and styled with css. Get the user page field CheckoutUser by creating a user field snippet, changing the field name, and adding it to the page layout. Once it's in the layout you can add any styling you need to get what you want.

We also wrapped the field span in a SecurityTrimmedAdministrators div created in the snippet editor to only show the field to users with editing permissions.

Note when no one has checked out the page it returns a non-breaking space &nbsp\;, which will take up vertical space in the layout unless you set the line-height and font-size to 0 for your main container.

If a page is checked out you can style the elements that are created inside your main container. We added this to preface the user name with "Checked out to:"

.checked-out > nobr:before { content: "Checked out to: "; }

  • What about hiding this from users who don't need to know? I only want other editors to see it? – Rothrock Nov 1 at 15:42
1

There are a couple ways to do this with javascript. You can check the Pages field value for Checked Out To and if its not empty, then the page is checked out.

You could also use this solution for checking the page's SP.File.checkOutType property with a REST or CSOM call: how to determine if a page is checked out? Client side, using javascript?

  • Thanks for the idea, but I'm really looking for a solution that handles this through the masterpage or pagelayout like the current notification that shows for the person who has it checked out. – Rothrock Oct 31 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.