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

Forums / General Discussions / newsarchive LayoutTemplate Not working

newsarchive LayoutTemplate Not working

6 posts, 1 answered
  1. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    17 Jun 2010
    Link to this post
    hi

    i am using sitefinity 3.7 sp3

    in News Archive control i hav set LayoutTemplate But it is not working

    it is using default layout.

    how can i apply Custom template to it.

    thanks
    vinamra
  2. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    18 Jun 2010
    Link to this post
    hi
    plz any one plz help me layouting the News Archive control.

    thanks
    vinamra
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 Jun 2010
    Link to this post
    Hello vinamra,

    In the controls configuration file in ~/App_Data/Configuration add this:
    <!--Provides user interface for displaying the archive of the news items in the News module.-->
    <viewSettings hostType="Telerik.News.WebControls.NewsArchive" layoutTemplatePath="~/Sitefinity/ControlTemplates/News/ArchiveTemplate.ascx" />

    then restart the website. To make sure it is applying the custom template you can put something like this for testing purposes in the template:
    <h1>CustomTemplate</h1>

    Make sure that the website is restarted after mapping the template.

    Greetings,
    Radoslav Georgiev
    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
    Answered
  4. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    23 Jun 2010
    Link to this post
    Greetings,

    Is there a way to localize the News Archive Template.
    We'd like to have the month names in various languages.

    Thanks in advance.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Jun 2010
    Link to this post
    Hello Chanan Zass,

    You need a custom control that inherits from NewsArchive. You have to override BindHierarchicalArchive method where the RadTreeView control is bound. You should detect the current culture - System.Threading.Thread.CurrentThread.CurrentUICulture and depending on that, bind the RadTreeView nodes and set the node.Text property to the correct culture.

    Regards,
    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
  6. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    24 Jun 2010
    Link to this post
    Detecting the current culture is simple enough.
    The rest is a bit over our heads.

    Thanks all the same.
    --------------------------

    A day later, it seems we can actually figure this thing out.
    Perhaps thus we'll be able to also fix another archive view problem, where the RadTree is sorted by DateCreated, so it seems, rather than by Publication_Date, at least in our version (3.7.2022).

     
Register for webinar
6 posts, 1 answered