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

Forums / Bugs & Issues / Create news item template

Create news item template

7 posts, 0 answered
  1. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    07 Feb 2011
    Link to this post
    I was trying to create a news item template. I added code and title and clicked Save. Went back to use it it was not in the list of available templetes for news item. I created it again, it would still not appear in the available templates. Then i closed down everything and went to it again, and there they were. It seems that when you create a new template you have to close down everything and then come back to it for the new template to appear in the list. I am using IE 8.

    Thanks,
    Andrei
  2. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    07 Feb 2011
    Link to this post
    Also, there is no option to delete all the new templates i have just created.
    Thanks,
    andrei
  3. Sonya
    Sonya avatar
    205 posts
    Registered:
    09 Dec 2016
    08 Feb 2011
    Link to this post
    Hello Andrei,

    Unfortunately there is a refresh problem when creating a Template in the News Widget.  The issue (ID: 107200) is logged and expects a review.

    As a workaround you can create/delete custom widget templates from: Design>Widget Templates

    Greetings,
    Sonya
    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
  4. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    24 Mar 2011
    Link to this post
    Hi,

    I am trying to do something but it is not working.

    I am trying to display two fields 'inline'. It worked for the items list but not for the single item.

    This is the code with me trying everything to make it look in line:
    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
     
    <style type="text/css">
    .inline
    {display:inline;}
    .left
    {text-align:left; width:100%;}
     </style>
     
    <telerik:RadListView ID="DetailsView" ItemPlaceholderID="ItemContainer" AllowPaging="False" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <LayoutTemplate>
            <div class="sfnewsDetails">
                <div class="sfnewsLinksWrp">
                    <sf:MasterViewHyperLink class="sfnewsBack" Text="<%$ Resources:NewsResources, AllNews %>" runat="server" />
                </div>
                <asp:PlaceHolder ID="ItemContainer" runat="server" />
            </div>
        </LayoutTemplate>
        <ItemTemplate>
     
            <h1 class="sfnewsTitle">
                <asp:Literal Text='<%# Eval("Title") %>' runat="server" />
            </h1>
     
            <sf:FieldListView ID="summary" runat="server" Text="{0}" Properties="Summary" WrapperTagName="div" WrapperTagCssClass="sfnewsSummary"  />
     
            <div class="sfnewsContent">
                <asp:Literal ID="Literal1" Text='<%# Eval("Content") %>' runat="server" />
            </div>
     
            <div class="left">
    <sf:FieldListView ID="PublicationDate" runat="server" Format="{PublicationDate.ToLocal(): dd MMM yyyy}" /><br /><asp:Literal Text=" By:" runat="server" />&nbsp;<sitefinity:TextField runat="server" CssClass="inline" DisplayMode="Read" Value='<%# Eval("Author")%>' />&nbsp;<sitefinity:TextField runat="server" CssClass="inline" DisplayMode="Read" Value='<%# Eval("SourceName")%>' />
            </div>
     
        </ItemTemplate>
    </telerik:RadListView>


    Desired result should be:
    Title
    News content
    date
    By: Author SourceName

    Attached is the actual result though.

    Thanks,
    Andrei
  5. Sonya
    Sonya avatar
    205 posts
    Registered:
    09 Dec 2016
    25 Mar 2011
    Link to this post
    Hi Andrei,

    To make By and Author name in one line you should apply the same class for the div container too (.inline div)

    <style type="text/css">
    .inline , .inline div
    {display:inline;}
    .left
    {text-align:left; width:100%;}
     </style>



    Greetings,
    Sonya
    the Telerik team
  6. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    25 Mar 2011
    Link to this post
    Sonya,

    I was just replying to say that I fixed the issue by placing everything in one field.
    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
     
    <telerik:RadListView ID="DetailsView" ItemPlaceholderID="ItemContainer" AllowPaging="False" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <LayoutTemplate>
            <div class="sfnewsDetails">
                <div class="sfnewsLinksWrp">
                    <sf:MasterViewHyperLink class="sfnewsBack" Text="<%$ Resources:NewsResources, AllNews %>" runat="server" />
                </div>
                <asp:PlaceHolder ID="ItemContainer" runat="server" />
            </div>
        </LayoutTemplate>
        <ItemTemplate>
     
            <h1 class="sfnewsTitle">
                <asp:Literal Text='<%# Eval("Title") %>' runat="server" />
            </h1>
     
            <sf:FieldListView ID="summary" runat="server" Text="{0}" Properties="Summary" WrapperTagName="div" WrapperTagCssClass="sfnewsSummary"  />
     
            <div class="sfnewsContent">
                <asp:Literal ID="Literal1" Text='<%# Eval("Content") %>' runat="server" />
            </div>
     
            <div class="left">
    <sf:FieldListView ID="PublicationDate" runat="server" Format="{PublicationDate.ToLocal(): dd MMM yyyy}" /><br /><sitefinity:TextField runat="server" DisplayMode="Read" Value='By: <%# Eval("Author")%> <%# Eval("SourceName")%>' /></div>
     
        </ItemTemplate>
    </telerik:RadListView>
    As above, but maybe your solution is better. I will see.

    One more question. Is there a way of making my templates the default ones?
    I don't want the users to keep configuring every news widget.

    Thanks again,
    Andrei
  7. Sonya
    Sonya avatar
    205 posts
    Registered:
    09 Dec 2016
    25 Mar 2011
    Link to this post
    Hello Andrei,

    Currently there is no option to set  widget template as default. I logged this as feature request ( with internal ID
    111649) and send it for review. On the next planning we will review all feature requests and see if we will be able to include your request for the next Q. Then we will add bugs/features to the PITS and you will be able t use the internal ID to monitor the status of the issue.


    Kind regards,
    Sonya
    the Telerik team
7 posts, 0 answered