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

Forums / Developing with Sitefinity / Events Module + List

Events Module + List

9 posts, 0 answered
  1. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    09 May 2008
    Link to this post
    Within the "All Events" List view - How can I show my Event date in this list?  I have 24 events with the same exact name and I need to be able to figure out what event is tied to a specific date.

    Please advise.
  2. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    12 May 2008
    Link to this post
    Hi medicalwebgeek,

    You could add a date next to the Events name by modifying the ContentViewItemList.ascx file stored in the following folder ~/YourProject/Sitefinity/ControlTemplates/Events. This way each event would appear with the desired date next to its heading. Please find below the modifications which should be made:

    Before:
    <ItemTemplate> 
            <li> 
                <dl> 
                <dt> 
                    <asp:HyperLink ID="fullContent1" runat="server"
                        <asp:Literal ID="Title" runat="server"></asp:Literal> 
                    </asp:HyperLink> 
                </dt> 
                <dd class="sf_date"
                    <sfCtrl:DateTimeLiteral runat="server" ID="Publication_Date" DateFormatString="D"></sfCtrl:DateTimeLiteral> 
                </dd> 

    After:
    <ItemTemplate> 
            <li> 
                <dl> 
                <dt> 
                    <asp:HyperLink ID="fullContent1" runat="server"
                        <asp:Literal ID="Title" runat="server"></asp:Literal> ( <sfCtrl:DateTimeLiteral runat="server" ID="Publication_Date" DateFormatString="D"></sfCtrl:DateTimeLiteral> ) 
                    </asp:HyperLink> 
                </dt> 

    The highlighted ID states the exact date you want to appear next to the Events title. The value of ID could be any meta key defined for the Events module in the web.config file in the section <telerik> -> <cmsEngine> -> <metaFields>. For example, some are: Publication_Date, Expiration_Date, Event_Start and Event_End.

    Hope this helps.

    Sincerely yours,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    13 May 2008
    Link to this post
    My question is related to when I am in the Content Management System for the Events Module(Sitefinity/Admin/Modules.aspx?module=Events).  The intial list only shows the event title and status (published).  I need to be able to show the event date on this page since I have 24+ Board Meetings.
  4. Joe
    Joe avatar
    64 posts
    Registered:
    05 Jul 2012
    13 May 2008
    Link to this post
    You can check out an article I put together on the Telerik.Events for information on developing with the events module.

    You can add any on of the field that the Events module knows about to one of the events page.  Here is how you add the Start_Date to the All Events list view.

    Edit ~/YourProject/SiteFinity/ControlTemplates/Events/ContentViewItemList.ascx or ~/YourProject/SiteFinity/ControlTemplates/Events/CommunityContentViewItemList.ascx
    Depending on which one you are using...

     Look for the <ItemTemplate> section and add in the following

    Event Start Time:<sfCtrl:DateTimeLiteral runat="server" ID="Event_Start" DateFormatString="D"></sfCtrl:DateTimeLiteral> 

    You can add any field that is available to the Events manager by placing a control for it on this page and Sitefinity will populate the field.

    Hope this helps
    Joseph Guadagno
    http://www.sevdnug.org
  5. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    13 May 2008
    Link to this post
    Shouldn't I be working on a file in ~/YourProject/Sitefinity/ADMIN/ControlTemplates?  Since I am trying to modify the admin page?
  6. Joe
    Joe avatar
    64 posts
    Registered:
    05 Jul 2012
    13 May 2008
    Link to this post
    No, the Admin  folder is used for the pages in the admin section which is used for the reading, writing and updating the content.  The ControlTemplates folder is typically where the user facing controls are stored.
  7. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    13 May 2008
    Link to this post
    But the page that I am referring to is in my admin section.   I am not wanting to update my public facing page, I am wanting to update my admin page that list all of my upcoming events.

    For example - Login to Sitefinity > Click on Modules > Click on Events > you are now on the all events page that shows all of your events. 

    If I am missing something, please let me know.
  8. Joe
    Joe avatar
    64 posts
    Registered:
    05 Jul 2012
    13 May 2008
    Link to this post
    Sorry I misread what you wanted.  You should edit the /Admin/ControlTemplates/Events/ControlPanelList.ascx.  Look for the <asp:GridView> tag and update it to look like this...

    1<asp:GridView ID="GridView1" AllowPaging="true" AllowSorting="true" PageSize="20" AutoGenerateColumns="false" GridLines="none" CssClass="listItems" runat="server"
    2  <Columns> 
    3    <asp:ButtonField ButtonType="Link" CommandName="Select" Text="<%$Resources:Edit %>" accessibleheadertext="<%$Resources:Edit %>"><ItemStyle CssClass="gridActions" /></asp:ButtonField> 
    4    <asp:TemplateField AccessibleHeaderText="<%$Resources:Delete %>"
    5      <ItemTemplate> 
    6     <asp:LinkButton runat="server" ID="cmdDelete" CommandName="Delete" Text="<%$Resources:Delete %>" ToolTip="Delete" CssClass="gridActions delete"></asp:LinkButton> 
    7      </ItemTemplate> 
    8      <ItemStyle CssClass="gridActions delete" /> 
    9    </asp:TemplateField>         
    10    <asp:ButtonField ButtonType="Link" CommandName="View" DataTextField="Title" HeaderText="<%$Resources:Name %>" SortExpression="Title"><ItemStyle CssClass="gridContentTitle" /></asp:ButtonField> 
    11    <asp:ButtonField ButtonType="Link" CommandName="View" DataTextField="Event_Start" HeaderText="Event_Start" SortExpression="Event_Start"><ItemStyle CssClass="gridContentTitle" /></asp:ButtonField> 
    12    <asp:TemplateField HeaderText="<%$Resources:Status %>"
    13      <ItemTemplate> 
    14        <asp:Label ID="statusMessage" runat="server" CssClass="stat"></asp:Label> 
    15      </ItemTemplate> 
    16    </asp:TemplateField>         
    17  </Columns> 
    18</asp:GridView> 
    19 

    The new item is line 11.

    Hope this helps!
    Joseph Guadagno
    http://www.sevdnug.org
    http://www.josephguadagno.net
  9. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    13 May 2008
    Link to this post
    Pefect - Thanks for your help.
Register for webinar
9 posts, 0 answered