Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Ready to Publish programmatically

Vote:
 

When editing a page or shared block, editors has the option to set it as "Ready to Publish" when it is saved.

How can I give content this status programmatically?

#123191
Jun 26, 2015 11:13
Vote:
 

It should be SaveAction.CheckIn,

Regards.

/Q

#123193
Jun 26, 2015 12:49
Vote:
 
var contentRepo = ServiceLocator.Current.GetInstance<IContentRepository>();

contentRepo.Save(model,SaveAction.CheckIn,AccessLevel.NoAccess );

This will save publish every time. Episerver 8 

#144259
Feb 10, 2016 2:30
Vote:
 

Maybe forgot to filter a rendered list on published status?

Check filter for visitor below Episerver.Filters namespace in that case.

#144270
Feb 10, 2016 9:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.