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

Forums / Set-up & Installation / Show last news

Show last news

7 posts, 0 answered
  1. Miran Zgec
    Miran Zgec avatar
    19 posts
    Registered:
    06 Oct 2006
    08 Nov 2007
    Link to this post
    Hello

    I would like to setup single news to show me the last entered news (news with the most current date)?

    And I have another problem:
    In single news edit mode, when I click "Select" for field "ArticleID" i get following error:

    ------------------------------------------------------------------------------------------------------

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The resource object with key 'SelectAnItem' was not found.

    Source Error:

    Line 1:  <asp:DropDownList ID="providersList" runat="server" AutoPostBack="true"></asp:DropDownList>
    Line 2: <h3><asp:Literal runat="server" Text="<%$Resources:SelectAnItem %>"></asp:Literal></h3>
    Line 3: <div class="configTools big">
    Line 4: <asp:GridView runat="server" ID="itemsGrid" AutoGenerateColumns="false" PageSize="13" GridLines="none" CssClass="listItems">

    Source File: /pge-celje/Sitefinity/Admin/ControlTemplates/News/ContentSelector.ascx    Line: 2


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832


    ------------------------------------------------------------------------------------------------------

    Thank you

  2. Miran Zgec
    Miran Zgec avatar
    19 posts
    Registered:
    06 Oct 2006
    08 Nov 2007
    Link to this post
    Oups

    I posted this in wrong category - please move it to the right one.


  3. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    08 Nov 2007
    Link to this post
    Hi Miran,

    This is a known issue in Sitefinity 3.1 official release. This has been fixed for the Service Pack. So we would suggest you upgrade your project to v3.1 SP1.

    Also, a workaround for this is provided in the following post.

    Hope this helps.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Miran Zgec
    Miran Zgec avatar
    19 posts
    Registered:
    06 Oct 2006
    08 Nov 2007
    Link to this post
    Installed SP1 and works great

    One more thing

    How to setup single news to show me the last entered news (news with the most current date)?

    Thanks
  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    08 Nov 2007
    Link to this post
    Hello Miran,

    There are three possible approaches to achieve this:
    1. The SingleNews control has a CustomDataSource property, so you can implement your logic here.

    2. You could wrap the SingleNews control and implement the necessary functionality.
    3. You could use the NewsList control and:
    • Set AllowPaging property to false
    • Set NewsCount to 1
    Hope this is helpful.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. psus
    psus avatar
    5 posts
    Registered:
    19 Apr 2006
    22 May 2008
    Link to this post
    Could you please provide an example of how to implement the logic to display the last published news with the single news control and custom data source?

    Regards
    Pelle
  7. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    23 May 2008
    Link to this post
    Hi pelle,

    I have attached an example how to achieve the required functionality with a user control wrapping SingleNews control. Please note that to test the control, you should upload it in the "Add Controls" toolbox through the Sitefinity interface.

    Hope this is helpful for you.

    Greetings,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
7 posts, 0 answered