Sitefinity Toolkit HttpHandlers

The Sitefinity Toolkit library defines a set of HttpHandlers used to retrieve specific pages of data or content for use within the Sitefinity websites. To use, each individual handler must be registered in the web.config file for the invidual Sitefinity website (additional documentation needed).

API Handler

Retrieves the JSON data from the JSON API. The response depends on the specific page being requested, as outlined below:

Events

monthevents.ashx retrieves a JSON version of the MonthEvents class (see JSON API) for the current month. To retrieve other months, use the month and year querystrings as integers, for example monthevents.ashx?month=2&year=2009 for events from February 2009.

eventsbydate.ashx - retrieves a JSON version of the EventList class (see JSON API) for the current day. To retrieve other days, use the date querystring and pass a valid date. for example eventsbydate.ashx?date=2010/02/09 retrieves events taking place on February 9, 2009.
External Events
In addition, the handler also can be called to retrieve events that have the MetaData field "External" flagged as true. This can be used to define "special events" so that only highlighted events are retrieved through the API instead of ALL of the events.

externalmonthevents.ashx same as the monthevents.ashx handler defined above, but retrieves only events flagged as "External"

externaleventsbydate.ashx same as the eventsbydate.ashx handler defined above, but retrieves only events flagged as "External"

News

latestnews.ashx retrieves a JSON version of the NewsList (see JSON API) with the top 5 current, active (non-expired) news items for the site. This can be refined using the Category querystring, for example latestnews.ashx?category=local retrieves the list of the top 5 current, active news categorized as "local".

featurednews.ashx retrieves a JSON version of the NewsList (see JSON API) with the top 5 current, active (non-expired) news items for the site which have the MetaData field "TopStory" set to true.

Calendar Feed

This handler will generate an iCal feed to which users can subscribe via Outlook, iPhone etc. It is not complete.

Event Reminder

This handler retrieves an iCal item for a specific event, using the Guid for the event item.

SiteMap

Builds a Google-compatible XML Sitemap for submission to search engines. Retrieves content from each provider, combining with the full list of pages from the Sitefinity SiteMap. Changefreq is defaulted to monthly and priority is hard-coded to 0.5. Any changes to the SiteMap will automatically be reflected in this handler.

Smooth Menu Source

This handler returns an html menu (ul/li) nested with all subpages, built by parsing through all the pages in the Sitefinty SiteMap. Any changes to the SiteMap will automatically be reflected in this handler.

Last edited Feb 28, 2011 at 3:09 PM by SelArom, version 2

Comments

No comments yet.