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

Forums / Developing with Sitefinity / EventsManager GetMetaData for Description

EventsManager GetMetaData for Description

3 posts, 0 answered
  1. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    04 Sep 2009
    Link to this post

    I was playing around with some ideas I came up with by watching Sitefintiy API Tips and tricks webinar by Gabe.

     

    I am able to retrieve a list of Events for the date pass to the page.  I am able to display most of the data for the events, with the exception of Description.

     

    For example I can get the start date using this:

    string Event_Start = contentItem.GetMetaData("Event_Start").ToString();

     

    How do I get the content from the Description for the event?

    Thanks for any help!

    David

  2. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    04 Sep 2009
    Link to this post
    Hi David ,

    Thanks for contacting us.

    The events module inherits most of its features from the Generic Content module, so you can use the Generic Content's module API, mainly the IContent interface, to pull the description (a.k.a. Content). Here is some sample code:

    Telerik.Events.EventsManager manager = new Telerik.Events.EventsManager("Events"); 
            IList myContent = manager.Content.GetContent(); 
            Guid eventId = new Guid("13b675f0-1011-4b2c-b7a5-8ac21756639a"); 
            foreach (IContent ic in myContent) 
            { 
                if (ic.ID == eventId) 
                { 
                    Response.Write(ic.Content); 
                } 
            } 

    Kindly let us know if you have any questions.

    Kind regards,
    Joe
    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.
  3. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    04 Sep 2009
    Link to this post
    Thanks Joe,   I am getting the content now.

    David
Register for webinar
3 posts, 0 answered