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

Forums / Developing with Sitefinity / Customising the EventsView module

Customising the EventsView module

10 posts, 1 answered
  1. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Hi
    I need to be able to customise the events view module so that I can change the layout.

    I've read the knowledge base article on how to map a view to an external template in sitefinity 3.6 or later, but I'm still a bit unclear on some bits.

    I've downloaded the external templates file from client.net, and I'm assuming that I need to edit ContentViewItemView.ascx is this correct?

    I've also created a Telerik.Sitefinity.Configuration.ControlsConfig.xml file within the app_data folder, with the following contents.

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
        <viewMap>
            <!--Displays all events-->
            <viewSettings hostType="Telerik.Events.WebControls.EventsView">
                <additionalTemplates>
                    <!--Item List-->
                    <add key="ItemListTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx" />
                    <!--Single Item-->
                    <add key="SingleItemTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx" />
                </additionalTemplates>
            </viewSettings>
        </viewMap>
    </controlsConfig>

    When I make any edits non of these changes seem to be shown on the live page.

    Am I doing something wrong?

    Any help appreciated 

    Thanks
    Martin.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Nov 2010
    Link to this post
    Hi martin,

    1. You should work with mode templates - ListPageMaster.ascx and ListPageDetail.ascx

    2. After you make changes to ControlsConfig file you have to restart the application

    3. If the problem persists you can use ItemsListTemplatePath and SingleItemTemplatePath public properties of the control or its ControlDesigner as described in this post.

    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
  3. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Hi

    I don't understand why I should be using the ListPageMaster.ascx and ListPageDetail.ascx pages, aren't these specific for the News module? 

    I want to edit the layout of the Events module.

    Thanks
    Martin.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Nov 2010
    Link to this post
    Hi martin,

    ListPageMaster.ascx and ListPageDetail.ascx are not pages. They are controls. You should use them, because the templates you use are obsolete and used in older versions. We have these templates for backward compatibility and some merging of the content and custom changes.

    Kind 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
  5. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Hi

    I downloaded the Sitefinity_3_7_standard_trial_ExternalTemplates but there is no ListPageDetails.ascx or ListPageMaster.ascx within the control templates\Events folder do I just copy the existing ones from the news folder?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Nov 2010
    Link to this post
    Hello martin,

    The templates are located inside \Sitefinity\Admin\ControlTemplates\Events\Modes. Windows explorer provides search that you can use to find a file from a directory.

    Greetings,
    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
  7. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Ah I see now, I wasn't looking in the Admin folder as I assumed that all those files related to the project manager side of things so I was leaving them well alone in case I broke something.

    Thanks.
  8. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Hi
    Sorry about this, but I can't get my changes to the template to be displayed, I've done the following:

    I've created a new folder called Configuration within the app_data folder, within this folder I've created a file called Telerik.Sitefinity.Configuration.ControlsConfig.xml the contents of this file are:

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
        <viewMap>
            <!--Displays all events-->
            <viewSettings hostType="Telerik.Events.WebControls.EventsView">
                <additionalTemplates>
                <!--Provides user interface for displaying a list of news items in the NewsView control for the News module.-->
                <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/ListPageMaster.ascx" />
                <!--Provides user interface for displaying a single news item in the NewsView control of the News module.-->
                <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/ListPageDetail.ascx" />
                </additionalTemplates>
            </viewSettings>
        </viewMap>
    </controlsConfig>

    I've also copied the ListPageMaster.ascx and ListPageDetail.ascx controls into the sitefinity/admin/controltemplates/events folder, and copied across the ListPageMaster.ascx.resx

    When I start up the page with the event viewer on it though no changes that I make to the ListPageMaster.ascx template are displayed on the page.

    Have I missed a step?
    Thanks
    Martin.

  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Nov 2010
    Link to this post
    Hello martin,

    Have you tried #3

    "3. If the problem persists you can use ItemsListTemplatePath and SingleItemTemplatePath public properties of the control or its ControlDesigner as described in this post."

    Best wishes,
    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
    Answered
  10. martin
    martin avatar
    25 posts
    Registered:
    05 Sep 2008
    08 Nov 2010
    Link to this post
    Hi
    Yeah got it working using the ItemsListTemplatePath property.
    Many thanks.
    Martin.
Register for webinar
10 posts, 1 answered