Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): 3.x Pre-release forums (retired) > News module format

News module format

  • Vangelis Intermediate avatar

    Posted on Mar 3, 2007 (permalink)

    Hello,


    Below is how news title and summary are displayed in edit mode

    this is my 2nd news itemthis is my 2nd news item summary

    on preview window this is how is is displayed. Is it possible to hide time and change date format in dd/mm/yyyy ?

    01/03/2007 00:00:00

    this is my 2nd news item

    this is my 2nd news item summary

    Best regards

    Vagelis

    Reply

  • Vangelis Intermediate avatar

    Posted on Mar 3, 2007 (permalink)

    Hello,

    It should be nicer and easier for visitors to understand if date and time format (selection of 12 or 24 with no seconds) would be displayed below news title or at least at the same row with different font size.

    Regards

    Vagelis

    Reply

  • Vangelis Intermediate avatar

    Posted on Mar 4, 2007 (permalink)

    I did the following change in newslist.ascx with the following and it worked.

            <!--<p class="newsdate"><%'# DataBinder.Eval(Container.DataItem, "Publication_Date") %></p>-->
            <p class="newsdate"><%#Eval("Publication_Date", "{0:dd/MM/yyyy}")%></p>    

    But it should be a general option in the project for date and time format.

    Best regards

    Vagelis

    Reply

  • Rebecca Rebecca admin's avatar

    Posted on Mar 5, 2007 (permalink)

    Hi Vagelis,

    Thank you very much for your suggestion. We will definitely consider implementing more felexible ways to set date and time formats.

    Kind regards,
    Rebecca
    the telerik team

    Reply

  • Dennis avatar

    Posted on Oct 19, 2010 (permalink)

    Great tip Vangelis - your workaround works perfectly on the ListPageMaster.aspx file, where I added your snippet (slightly modified) to support Danish date format:

    <p class="sf_newsDate"><%#Eval("Publication_Date", "{0:d'. 'MMMM' 'yyyy}")%></p>

    Unfortunately it does not work on the ListPageDetail.aspx file.

    Do you also have a workaround for that?

    Regards, Dennis

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Oct 19, 2010 (permalink)

    Hello Dennis,

    Eval works on the Master template because there we use repeater which is bind to a datasource of IContent objects. The Details mode contains just standard ASP.NET controls which values are set dynamically and no one of these controls is a bindable control where you can use Eval

    Options

    1. Override the ContentView control and its SetSingleItemContent
    2. Use the url rewrite data from the query string to get the item and set the values

    All the best,
    Ivan Dimitrov
    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

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): 3.x Pre-release forums (retired) > News module format