News widget template
Hi.
I am trying to add custom template for the latest news displaying. I've copied the standart template into a new one and changed it:
<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<
h2
>Latest Articles</
h2
>
<
telerik:RadListView
ID
=
"NewsList"
ItemPlaceholderID
=
"ItemsContainer"
runat
=
"server"
EnableEmbeddedSkins
=
"false"
EnableEmbeddedBaseStylesheet
=
"false"
>
<
LayoutTemplate
>
<
ul
class
=
"sfnewsList sfnewsListTitleDateSummary"
>
<
asp:PlaceHolder
ID
=
"ItemsContainer"
runat
=
"server"
/>
</
ul
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
li
class
=
"sfnewsListItem"
>
<
h3
>
<
sitefinity:TextField
runat
=
"server"
Value='<%# Eval("Title")%>' />
</
h3
>
<
sf:FieldListView
ID
=
"summary"
runat
=
"server"
Text
=
"0"
Properties
=
"Summary"
WrapperTagName
=
"p"
/>
<
p
>
<
sf:DetailsViewHyperLink
ID
=
"FullStory"
Text
=
"Read more"
runat
=
"server"
CssClass
=
"sfnewsFullStory"
/>
</
p
>
</
li
>
</
ItemTemplate
>
</
telerik:RadListView
>
<
sf:Pager
id
=
"pager"
runat
=
"server"
></
sf:Pager
>
<
div
id
=
"ctl00_cphLatestArticles_C007_ctl00_ctl00_ctl00_NewsList_ctrl0_ctl00_ctl00_ConditionalTemplates"
style
=
"display:none;"
>
<
div
id
=
"ClientTemplatePanel_"
>
<
span
id
=
"titleLabel_write_"
class
=
"sfTxtLbl"
></
span
>
<
a
onclick
=
"return false;"
id
=
"expandButton_write_"
class
=
"sfOptionalExpander"
></
a
>
<
div
id
=
"expandableTarget_write_"
class
=
"sfFieldWrp"
>
<
input
name
=
"textBox_write_"
type
=
"text"
id
=
"textBox_write_"
class
=
"sfTxt"
>
<
div
id
=
"descriptionLabel_write_"
class
=
"sfDescription"
>
</
div
>
<
div
id
=
"exampleLabel_write_"
class
=
"sfExample"
>
</
div
>
</
div
>
</
div
>
</
div
>
Hello Vyacheslav,
Instead of
<sitefinity:TextField runat="server" Value='<%# Eval("Title")%>' />
you could use this:
<asp:Label runat="server" Text='<%# Eval("Title")%>' />
Hello, Lubomir
Thank you for your answer, all works fine now.