Create news item template

Posted by Community Admin on 04-Aug-2018 13:44

Create news item template

All Replies

Posted by Community Admin on 07-Feb-2011 00:00

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

Posted by Community Admin on 07-Feb-2011 00:00

Also, there is no option to delete all the new templates i have just created.
Thanks,
andrei

Posted by Community Admin on 08-Feb-2011 00:00

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

Posted by Community Admin on 24-Mar-2011 00:00

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

Posted by Community Admin on 25-Mar-2011 00:00

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

Posted by Community Admin on 25-Mar-2011 00:00

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

Posted by Community Admin on 25-Mar-2011 00:00

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

This thread is closed