Changing date format on news comments
I am working on a 4.0 site, although I believe this probably applies to even the newest version of 4.1. Unfortunately, upgrading this site is not an option at this time.
I'm trying to change the date format on the comments, but not having any luck. The current format appears to be "dd MM". I'm trying to change it to "MM dd, yyyy".
When I edit the the Single Item Settings of the news widget on the page, the area of the widget template for comments doesn't appear to have spot for me to change this. It looks like this:
<
br
><
hr
noshade
size
=
1
color
=
black
>
<
sf:ContentView
id
=
"commentsListView"
ControlDefinitionName
=
"NewsCommentsFrontend"
MasterViewName
=
"CommentsMasterView"
ContentViewDisplayMode
=
"Master"
runat
=
"server"
/>
<
sf:ContentView
id
=
"commentsDetailsView"
ControlDefinitionName
=
"NewsCommentsFrontend"
DetailViewName
=
"CommentsDetailsView"
ContentViewDisplayMode
=
"Detail"
runat
=
"server"
/>
Hi Orion,
PLease find below the default template we're using for Comments frontend list view.
<%@ Register TagPrefix="sitefinity" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<
sitefinity:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sitefinity:EmbeddedResourcePropertySetter
Name
=
"Telerik.Sitefinity.Resources.Themes.EditorContentArea.css"
Static
=
"true"
ControlID
=
"htmlEditor"
ControlPropertyName
=
"ContentAreaCssFile"
/>
<
sitefinity:ResourceFile
Name
=
"Styles/Ajax.css"
/>
</
sitefinity:ResourceLinks
>
<
a
id
=
"comments"
></
a
>
<
ol
id
=
"mainContent"
runat
=
"server"
class
=
"sfCommentsList"
>
</
ol
>
<
sitefinity:GenericCollectionBinder
id
=
"clientBinder"
runat
=
"server"
ServiceUrl
=
"~/Sitefinity/Services/Common/Comments.svc"
TargetId
=
"mainContent"
BindOnLoad
=
"false"
DataKeyNames
=
""
DataMembers
=
"Author, Comment"
LoadingPanelID
=
"mainContentLoadingPanel"
>
<
Containers
>
<
sitefinity:BinderContainer
ID
=
"BinderContainer1"
runat
=
"server"
RenderContainer
=
"false"
TemplateHolderTag
=
"OL"
ContainerTag
=
"LI"
>
<
li
>
<
strong
>Author ? Author.DisplayName : "" </
strong
> <
em
class
=
"sfCommentDate"
>Comment.DateCreated.sitefinityLocaleFormat('dd MMM, yyyy')</
em
>
<
div
class
=
"sfCommentText"
>Comment.Text</
div
>
</
li
>
</
sitefinity:BinderContainer
>
</
Containers
>
</
sitefinity:GenericCollectionBinder
>
<
telerik:RadAjaxLoadingPanel
ID
=
"mainContentLoadingPanel"
runat
=
"server"
Skin
=
"Sitefinity"
IsSticky
=
"false"
EnableSkinTransparency
=
"false"
><
asp:Literal
ID
=
"Literal1"
runat
=
"server"
Text="<%$ Resources:Labels, Loading %>" />
</
telerik:RadAjaxLoadingPanel
>
<
asp:Panel
ID
=
"addCommentsPanel"
runat
=
"server"
class
=
"sfSubmitComment"
>
<
h2
id
=
"addComment"
>Comment</
h2
>
<
telerik:RadEditor
ID
=
"htmlEditor"
runat
=
"server"
Skin
=
"Sitefinity"
Width
=
"100%"
Height
=
"200"
EditModes
=
"Design"
DialogHandlerUrl
=
"~/Telerik.Web.UI.DialogHandler.axd"
>
</
telerik:RadEditor
>
<
input
id
=
"addNewComment"
value
=
"Submit"
type
=
"button"
class
=
"sfSubmitBtn"
/>
</
asp:Panel
>
I tried this and the site is now down with a very cryptic error. I have restarted the site and cycled the app pool.
|
Hi Tony,
I'm really sorry to hear about the problems you have experienced. We have tried reproducing the issue locally, so we can study the possible causes, but were not able to. Would it be possible for you to send us a copy of the project files and a backup of the database associated with it so we can debug the problem locally?
Greetings,
Boyan Barnev
the Telerik team
I followed the instructions you listed however it seemed to have no effect on the comments list. I converted the list to an unordered list and changed the TemplateHolderTag to "UL" on the sitefinity:BinderContainer and theres no visible changes. Do I have to set the template path elsewhere?
Also the site I am working on is v4.3 Hotfix, in case that matters
I know this is way late to this post, but I am using 5.4 and having the exact same problem? What is the solution for this? Thanks.
Did you ever figure this out? It would help me greatly if I knew the solution.
Thanks.