+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Schedule Publish/Unpublish

Schedule Publish/Unpublish

33 posts, 0 answered
  1. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    15 Jul 2014
    Link to this post
    Hello,

    Could you please specify on what version of Sitefinity you are testing? I tested on Sitefinity 7.0 and I was able to publish on a specific date in the past directly from the back-end.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  2. Taha Zouhair
    Taha Zouhair avatar
    10 posts
    Registered:
    22 Aug 2013
    15 Jul 2014 in reply to Nikola Zagorchev
    Link to this post

    Hello Nikola,

    We're working on 6.2

    Thanks

  3. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    16 Jul 2014
    Link to this post
    Hello Taha,

    I was able to create a News item with a publication date in the past using this code snippet in Sitefinity 6.2 for Spanish language:
    CultureInfo backupCulture = System.Threading.Thread.CurrentThread.CurrentUICulture;
    CultureInfo cult = new CultureInfo("es");
    System.Threading.Thread.CurrentThread.CurrentUICulture = cult;
     
    App.WorkWith().AnyContentItem<NewsItem>().CreateNew().Do(
        n =>
        {
            n.Title = "Sample item in past";
            n.UrlName = "sample-item-in-past";
        })
        .Publish(new DateTime(1978, 4, 15))
        .SaveChanges();
    System.Threading.Thread.CurrentThread.CurrentUICulture = backupCulture;

    The item is created as Draft but after publishing its publication date remains the same as set in the code. Here is a reference.
    The same could be done by using Publishing on  a specific date and state a data in the past though the back-end.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
33 posts, 0 answered
1 2