November Happy Hour will be moved to Thursday December 5th.

Save iContent as draft

Vote:
 

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. 

#144257
Feb 10, 2016 1:59
Vote:
 
 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. 

#144258
Feb 10, 2016 2:01
Vote:
 

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?

#144263
Feb 10, 2016 7:37
Vote:
 

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; }

        [LocalizedRequired("/Reviews/Required/title")]
        public virtual double Rating { get; set; }

        [LocalizedRequired("/Reviews/Required/title")]
        public virtual string ReviewTitle { get; set; }

        [LocalizedRequired("/Reviews/Required/reviewText")]
        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; }
    }
}


 

#144301
Feb 10, 2016 17:16
Vote:
 

Add Iversionable interface....

#144307
Feb 10, 2016 17:27
Vote:
 

Need to implement this one 

http://world.episerver.com/documentation/class-library/?documentId=cms/7/aa941ae1-8d2d-6f69-907e-cc626e63230a

#144308
Feb 10, 2016 17:30
Vote:
 

Helps to check out what interfaces episerver uses on pagedata 

http://world.episerver.com/documentation/class-library/?documentId=cms/7/b38e303b-a955-4dc6-4bd0-d954c4815ea2

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

#144316
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.