Try our conversational search powered by Generative AI!

Save iContent as draft


Is there any way to save icontent as a draft? We need to be able to save as ready to publish so that the admins can publish the content as an approval chain. 

Feb 10, 2016 1:59
 var contentRepo = ServiceLocator.Current.GetInstance<IContentRepository>();

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

No matter what i try in the save action it will always publish. 

Feb 10, 2016 2:01

Are you sure you are not just looking at the earlier version in edit mode? Could you have a look at the version list gadget?

Feb 10, 2016 7:37

No the verision List gadget shows published. Also any time that we edit the content there is no option to publish it auto saves. This content is being saved as in the assest folder I am not sure that matters. Below is the content type. I am not sure if this is an auto save issue that causes the content to publish and not get put into the "ready to publish" status. Or if I need to set up an approval chain. 

    [ContentType(GUID = "E6758107-ACFB-499D-9731-C2FBBB9C1249", AvailableInEditMode = true)]
    public class Review : ContentData, IContent
        public virtual string VariantCode { get; set; }

        public virtual string UserEmail { get; set; }

        public virtual double Rating { get; set; }

        public virtual string ReviewTitle { get; set; }

        public virtual XhtmlString ReviewSummary { get; set; }

        public virtual ReviewStatus Status { get; set; }

        public virtual string ParentProductCode { get; set; }

        public virtual DateTime CreatedDateTime { get; set; }

        //IContent implementation
        public string Name { get; set; }
        public ContentReference ContentLink { get; set; }
        public ContentReference ParentLink { get; set; }
        public Guid ContentGuid { get; set; }
        public int ContentTypeID { get; set; }
        public bool IsDeleted { get; set; }


Feb 10, 2016 17:16

Add Iversionable interface....

Feb 10, 2016 17:27

Need to implement this one

Feb 10, 2016 17:30

Helps to check out what interfaces episerver uses on pagedata

If you need additional support for language versions etc...

Feb 10, 2016 18:35
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.