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

Forums / Designing with Sitefinity / Replace Source column with Category in News list

Replace Source column with Category in News list

3 posts, 1 answered
  1. Serge
    Serge avatar
    8 posts
    Registered:
    06 Feb 2009
    23 Nov 2009
    Link to this post
    Hi,

    I'm using Sitefinity 3.7.1990 CE.
    Is it possible to replace "Source" column with category name in Admin > Modules > News list ?

    Thanks in advance!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Nov 2009
    Link to this post
    Hi Serge,

    Here are the steps you have to follow

    1. Map external template NewsItemsList. You can find more information about setting the external templates from this KB.

    2.Modify ClientTemplatesHolder control and replace the following lines

    <telerik:ClientTemplate Name="Source" runat="server">
        {#MetaFields.Source#}
    </telerik:ClientTemplate>

    with

    <telerik:ClientTemplate Name="Source" runat="server">
        {#MetaFields.Category#}
    </telerik:ClientTemplate>

    3. Modify MasterTableView of the RadGrid

    <telerik:GridTemplateColumn
    UniqueName="Category" 
    HeaderText="<%$ Resources:Category %>">

    4. Modify DataBindGrid as shown below:

    function DataBindGrid(currentPageIndex, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL) {
        var requiredMetaFields = ['Title', 'Author', 'Category', 'Publication_Date', 'Expiration_Date'];
        var cultureInfoField = document.getElementById('<%= cultureInfoField.ClientID %>');
        Telerik.Cms.Engine.Services.ContentService.GetContentItems(currentPageIndex * pageSize, pageSize,
        sortExpressionsAsSQL, filterExpressionsAsSQL, requiredMetaFields, cultureInfoField.value, dataProviderName, updateGrid, OnFailed);
    }

    Note that all references to "Source" have to be removed.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Serge
    Serge avatar
    8 posts
    Registered:
    06 Feb 2009
    23 Nov 2009
    Link to this post
    Thank you very much for your help!
    It's works.
Register for webinar
3 posts, 1 answered