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

Forums / Developing with Sitefinity / Events Module: Outputting URL for sharing

Events Module: Outputting URL for sharing

2 posts, 0 answered
  1. John Gilbert
    John Gilbert avatar
    2 posts
    Registered:
    02 Jul 2009
    30 Jun 2011
    Link to this post
    I inherited this project and am trying my best to figure out how to output the URL to the page of each event, so the link can be shared on email to friends. I see the url in the SfCMSBaseContent table, but have no idea how to output that to the page, or if it will even work once I get it to. 

    I hsve also tried an alternative method, trying to do a like search in the events provider on the event's title with dashes to match up with the SfCmsBaseContent table's url, to pull event details to display on my page, but it doesn't find it for some reason. 

    here is my attempt at grabbing the URL.

    public static List<EventItem> SelectEvent(string url)

            {

                

                EventsManager eventsManager = new EventsManager("Events");

                List<IMetaSearchInfo> filter = new List<IMetaSearchInfo>();

                url = url.Replace("-","_");

                System.Console.WriteLine(url);

                filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "LoweredUrl", url, SearchCondition.Like, JoinType.And));

                IList events = eventsManager.Content.GetContent(0, 1, "Event_Start ASC", ContentStatus.Published, filter.ToArray());

                return FillEventItems(events);

                

            }



    Thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    01 Jul 2011
    Link to this post
    Hi John ,

    You can keep using the API. GetContent returns list of IContent objects. Each  IContent has a property UrlWithExtension that you need to append to the page on which your news view is added.

    You might find this post useful.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered