More in this section

Forums / Developing with Sitefinity / Event Customization

Event Customization

6 posts, 0 answered
  1. Femy
    Femy avatar
    37 posts
    Registered:
    02 Jan 2008
    28 Jul 2008
    Link to this post
    Hi

    On the Events module I am trying to get the events displayed as follows

    Event Name
    Month 1-9, 2008 Chicago, IL

    I see that when I add the geomapping it displays it as
    City:Chicago
    State:IL

    etc

    Is there a way to do this from the frontend or do I have to use the API to get the events displayed as shown below.

    Event Name
    Month 1-9, 2008 Chicago, IL


    TIA
    FR

  2. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    30 Jul 2008
    Link to this post
    Hi Femy,

    Thanks for contacting us.

    To give you a high level overview, you would need to comment out some of the fields and delete some of the field names, like street, to achieve this functionality. Sitefinity's module templates are very flexible and rearranging the fields are simple. For the Events Module, you would need to customize this file:

    ~/Sitefinity/ControlTemplates/Events/Modes/ListPageMaster.ascx

    Please see the attached code for the ListPageMaster.ascx file and screen shot demonstrating what this looks like when implemented. If you'd like to edit the detail template, which you get when you click on the event name, edit this file:

    ~/Sitefinity/ControlTemplates/Events/Modes/ListPageDetail.ascx

    For this change to persist across all display modes, you would also need to add the changes to these files:

    ~/Sitefinity/ControlTemplates/Events/Modes/ExpandableListsMaster.ascx
    ~/Sitefinity/ControlTemplates/Events/Modes/AllPostsListsMaster.ascx


    I also noticed that you wanted the state abbreviation instead of the state name. To achieve this functionality, you would need to change the value of the drop down list of states in these files:

    ~\Sitefinity\Admin\ControlTemplates\Events\ControlPanelInsert.ascx
    ~\Sitefinity\Admin\ControlTemplates\Events\ControlPanelEdit.ascx


    You would need to change the drop down list from this:

    <asp:DropDownList ID="State" runat="server">
     <asp:ListItem Text="Massachusetts"></asp:ListItem>

    To this:

    <asp:DropDownList ID="State" runat="server">
    <asp:ListItem Text="MA"></asp:ListItem>

    For more information on binding fields with the events module, please view Working with Modules > Adding Custom Meta Fields in our User Manual.

    I hope that I have clearly explained how to achieve the desired functionality. Feel free to contact us if you have any other questions.

    Best wishes,

    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Femy
    Femy avatar
    37 posts
    Registered:
    02 Jan 2008
    30 Jul 2008
    Link to this post
    Thx Joe. This helps a lot. I will look thru.

    FR
  4. Femy
    Femy avatar
    37 posts
    Registered:
    02 Jan 2008
    06 Sep 2008
    Link to this post
    OK I am having more issues with the styling here.

    1) I want the date displayed as
    September 15-17,2008,Las Vegas,NY. Right now if I set theStart and End Date with the Date format as "September 05,2008, it displays as two separate items a

    9/15/2008 3:24:00 PM

    9/17/2008 4:24:00 PM.

    2) Regarding the functionality, in the EventView Control Property , I set the "

    How to display the full item information page?" to the second option and added a link to a page on the site, but it just takes me to a strange link (Company/Events/EventDetails/08-08-25/Shop_Org_Annual_Summt_08.aspx?ReturnURL=%2fDefault.aspx) and give a page not found error

    I dont seem to find any documentation on how to use this control. Pls advice.



    TIA\FR


  5. Femy
    Femy avatar
    37 posts
    Registered:
    02 Jan 2008
    09 Sep 2008
    Link to this post
    OK I sorted out (2) but still need help with the first one. Any ideas?
    TIA
    FR
  6. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    12 Sep 2008
    Link to this post
    Hello Femy,

    Sitefinity does not support the functionality from your first question out of box. To achieve this you would need to extend the EventsView control. Here is a high level overview on what would you need to do:

    1. Open the ListPageMaster.ascx template and remove the labels with ids Event_Start and Event_End so that Sitefinity does not display the two dates by default
    2. Add new label, you can set it's id to EventRange for example
    3. Override the EventsView control and in particulary the SetItemMetadata method. In this method, you will have the access to start and end date of event, so you can format the string as you see fit. Once you have the string formatted, you can set the value of EventRange label to this new string.

    You can find the article on how to extend ContentView control (EventsView extends ContentView, so the same applies) here:
    http://www.sitefinity.com/help/developer-manual/extending-built-in-controls-content-view-control.html

    I don't know if you are a developer, but this task will have to involve a c# developer.

    I hope you have found this information helpful. Let us know if there is anything else we can do for you.

    Best wishes,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
6 posts, 0 answered