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

Forums / General Discussions / Formatting EventsView Data

Formatting EventsView Data

2 posts, 0 answered
  1. Michael Webster
    Michael Webster avatar
    1 posts
    Registered:
    08 Dec 2009
    15 Jan 2010
    Link to this post
    I am displaying data from the EventsView.  I want to control the layout and spacing, but I am stuck just selecting if I want the value to display or not.  I also cannot do anything with title or description because the checkboxes are disabled.
    In the example below, I want to put the start and end date on the same line, Add a blank line between the dates and teh Event description, add a label for description, and put all the contact infomation on one line with out labels.
    I am using Sitefinity 3.6.  I have seen a few thread that discuss working with PresentaionModes, but I do not have the same files available to me.  The examples I have seen refer to

    ~/Sitefinity/Admin/ControlTemplates/Events/Design/EventsViewControlDesigner.ascx

    The path I have stops at the Events folder and only contains ContentVersionView.aspx.

    I would also like to modify the linkUrl to add a queryString parm specific to the web site.  The existing link doesn't work without this parm.

    Thank you.

    Event Title

    Start: 1/14/2010 9:00:00 AM

    End: 4/14/2010 10:00:00 AM

     

    Event Desc
    Street: street
    City: city
    Country: country
    State: state
    Contact:
    name
    Email: email
    Phone: phone
    Cell: cell
    Website: web
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Jan 2010
    Link to this post
    Hello Michael Webster,

    I want to control the layout and spacing, but I am stuck just selecting if I want the value to display or not.  I also cannot do anything with title or description because the checkboxes are disabled.

    You can map EventsViewControlDesigner template and set the AllowVisibilitySetting of TextSetting control with SettingTitle="Title" to true

    sample code


    <sfDesignSettings:TextSetting ID="setting1"
    TargetID="fullContent1"
    SettingTitle="Title"
    AllowLabelSetting="False"
    AllowFormatSetting="False"
    AllowVisibilitySetting="False"
    TargetVisibleByDefault="True">
    </sfDesignSettings:TextSetting>

    You have to map the external templates and this is the reason why you do not see any templates inside Events folder. Please take a look at How to map a template

    I would also like to modify the linkUrl to add a queryString parm specific to the web site.  The existing link doesn't work without this parm.


    If the links should be the same all the time you may harcode it in the mode template of EventsView control  - ListPageMaster.

    The better option is creating a custom class that derives from EventsView. Then you can override SetItemContent and find fullcontent link ( which is the Title link) and modify it as you want

    ctrl = FindContentViewControl("fullContent" + i, itemContainer);
    if (ctrl is HyperLink)
    {
        ((HyperLink) ctrl).NavigateUrl = "HERE SET YOUR URL";
    }


    Sincerely yours,
    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.
2 posts, 0 answered