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

Forums / General Discussions / News Archive Widget?

News Archive Widget?

15 posts, 0 answered
  1. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    26 Jan 2011
    Link to this post
    Hi there,

    I'm wondering what happened to the News Archive Widget? In the News widget I don't see any option for selecting an "archive" mode. Is there a way to do this with SF 4 out of the box or is this yet another standard tool that needs to be created manually? My goal is to have a news page that has a News List widget, displaying a list of 20 news items at a time and then I'd also like to have a News Archive widget in a side column that displays all the Months (grouped by year) that have news articles in them.

    If someone can point me to where this is and I'm just not seeing it that would be a great help!
    Thanks in advance.

    Cheers,
    Phill
  2. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    27 Jan 2011
    Link to this post
    Ok, so I've found an "Archive" widget that's under the "Navigation" section (odd place for it). The issue is that I have no idea what settings need to be set in order for it to display an archive of News. I would assume I might have to set Provider and ContentType? But I have no idea what these values would be, you'd think Content Type would be "news" but not that easy (is it ever?). 

    Can someone help me out here? Does any documentation exist on this widget?

    Thanks again,
    Phill
  3. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    27 Jan 2011
    Link to this post
    Ok, so I was able to answer my own question, just took some digging as it wasn't in the Designers manual or the Content Editors manual, but this one: http://www.sitefinity.com/4.0/documentation/User-guide/displaying-content-using-widgets/navigation-widgets-group/configuring-the-archive-widget.aspx

    ContentType Required: Telerik.Sitefinity.News.Model.NewsItem 

    But of course, things never work as expected. I have 1 news article and the archive widget displays two different months (Feb 2010 and Jan 2011). With ShowItemCount set to true it displays that there's one article in each. This is most likely caused by the fact that I have to start entering a number of news articles for the past year and attempted to set the published date of the first article to Feb 2010 which doesn't seem possible.

    So changing my own topic, is there a fix or a work around for being able to actually set the published date of a new article to something other than the CreatedDate (these should be two different fields!!)

    Thanks,
    Phill
  4. Hristo Borisov
    Hristo Borisov avatar
    190 posts
    Registered:
    18 Nov 2016
    01 Feb 2011
    Link to this post
    Hello Phill Hodgkinson,

    You can create a dynamic field in which you can set the any field you like for example CreatedDateFromThePast. You can later use the Widget Template editor to display that date on the necessary location of your controls. To create a dynamic field use the following snippet:

    App.WorkWith()
       .DynamicData()
       .Type(typeof(NewsItem))
       .Field()
            .TryCreateNew("CreatedDateFromThePast", typeof(DateTime))
            .SaveChanges(true);

    Please let me know whether the proposed solution works for you. Excuse us for the late response and we look forward to answering any other questions you have.

    Kind regards,
    Hristo Borisov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    01 Feb 2011
    Link to this post
    Hi Hristo,

    Your proposed solution doesn't address my problem. If I have to create a dynamic field to set a published date that's in the past then for any News item added going forward will use the published date and I'll have to create display widgets that can handle the two fields, that's just not a solution nor a viable work around.

    To me there has to be a way to set the published date to a previous date. I think all I'm looking for here is for you to confirm that this is a bug and that it's been logged and will be addressed.

    If you can think of any other way to get the PublishedDate behave properly I'd be open to suggestions.

    Cheers,
    Phill
  6. Justus Herrmann
    Justus Herrmann avatar
    1 posts
    Registered:
    05 Nov 2009
    02 Feb 2011
    Link to this post
    Hi Hristo,

    I second Phill's suggestion to set the published date to a previous date.
    Please include this option in the next service pack.

    Best regards,
    Justus
  7. Richard
    Richard avatar
    164 posts
    Registered:
    21 Nov 2009
    02 Feb 2011
    Link to this post
    I third it. In the meantime is there any problem with editing the database table that carries the date in directly?

    Cheers
    Richard
  8. Hristo Borisov
    Hristo Borisov avatar
    190 posts
    Registered:
    18 Nov 2016
    02 Feb 2011
    Link to this post
    Hi everyone,

    Since it is a common request that we should support PublicationDate different from the current one, we will do our best to resolve the problem as soon as possible. I have logged the issue in our system and you should expect a bug fix in one of our future releases.

    Editing the database directly is something we strongly discourage as it may cause a lot of issues during upgrade. You can modify the database the way you like however we don't guarantee that the upgrade process will be flawless from then on.

    Thank you a lot for sharing your feedback with us, and thus making the system much more flexible and user friendly. Please let me know if you have any further questions.

    Best wishes,
    Hristo Borisov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Sandeep
    Sandeep avatar
    5 posts
    Registered:
    10 Nov 2010
    05 Apr 2011
    Link to this post
    This is causing us some grief. Is this coming in the Q1 release?(PublicationDate different from the current one)
  10. Kevin
    Kevin avatar
    19 posts
    Registered:
    30 Sep 2010
    07 Apr 2011
    Link to this post
    Ditto
  11. Kalina
    Kalina avatar
    176 posts
    Registered:
    27 Oct 2016
    09 Apr 2011
    Link to this post
    Hi Kevin and all,

    We scheduled the implementation and will deliver a solution to this problem in 4.1. SP1 due at the end of May.

    As a temporary solution you can use Custom Fields and add a date field to capture such date creation date.
    This is not a perfect workaround but is something to use temporarily.

    We are sorry for the inconvenience that this is causing.

    Kind regards,
    Kalina
    the Telerik team

  12. Paul
    Paul avatar
    5 posts
    Registered:
    11 Feb 2011
    20 Apr 2011
    Link to this post

    In order to use this work around, I have created the suggeted custom feild "PublishedCustom" using the SiteFinity Custom News Feild GUI.  Now I'm going to re-import my news articles (from the past) using the code below, but how do I bind my "published" method parameter below to my newly created custom field "PublishedCustom"???

     

     

     

    public static bool CreateNewsItemFluent(string newsTitle, string newsContent, string author, string url,DateTime published)
           {
               Guid itemID = Guid.Empty;
               App.WorkWith().NewsItem().CreateNew()
                  .Do(nI =>
                  {
                      nI.Title = newsTitle;
                      nI.DateCreated = published; 
                      nI.PublicationDate = published;
                      nI.ExpirationDate = published.AddYear(10);                  nI.UrlName = url;
                      nI.Author = author;
                      nI.Content = newsContent;
                  })
                    .Publish()
                    .SaveChanges();
               return true;
           }

  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 May 2017
    22 Apr 2011
    Link to this post
    Hi Paul,

    There is DataExtensions (Telerik.Sitefinity.Model) methods of the Content item ( the news item) - GetValue and SetValue that can use.

    All the best,
    Ivan Dimitrov
    the Telerik team

  14. Saeed
    Saeed avatar
    14 posts
    Registered:
    21 Jun 2011
    23 Jul 2011
    Link to this post
    Hi Guys,
    I've a problem with the Archive widget, It seems it has problem with items of the first day of month! please take a look at the attached screenshot.
  15. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    12 May 2017
    27 Jul 2011
    Link to this post
    Hi Saeed,

    Please take a look at this forum thread, which discusses a similar issue, I believe you might find it useful. Generally the problem might arise if you have different dates set for the same content item, For example, if you have a news item, due to the ContentLifeCycle implementation that item has a Master state (the one you see in the grid when going to Content->News), a Live state (the one you see on the frontend in the News widget) and also a Temp state (when you open an item for editing). Besides that, an item has DateCreated and PublicationDate. In case there' s some discrepancy between them, the News widget will display one date for the same item on the forntend and a different one in the backend (since DateCreated is used for backend and PublicationDate for frontend). This can also cause the archive widget to display unexpected results.
    I see that you have specified Sitefinity 4.0 product version. We used to have some problems with the archive widget functionality, displaying the above mentioned symptoms,a s well as some items that were in draft state. The bugs have been fixed in our Sitefinity 4.1 version, so I would recommend you to upgrade a copy of your project to the latest officially supported version and test if the issue reproduces there (please have in mind that we support up to two versions back upgrade path, so in case you're running Sitefinity 4.0 official release, you should upgrade to Sitefinity 4.0 SP1 and then to Sitefinity 4.1 SP1 and then to the latest officially supported version Sitefinity 4.1 SP3)

    Kind regards,
    Boyan Barnev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
15 posts, 0 answered