Skip to content

Instantly share code, notes, and snippets.

@james-dibble
Created December 23, 2014 16:31
Show Gist options
  • Save james-dibble/b5ffc3da5b4cbb6072cc to your computer and use it in GitHub Desktop.
Save james-dibble/b5ffc3da5b4cbb6072cc to your computer and use it in GitHub Desktop.
Umbraco startup class to add routes for Syndication
using System.Web.Mvc;
using System.Web.Routing;
using Umbraco.Core;
public class Startup : IApplicationEventHandler
{
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
RouteTable.Routes.MapRoute(
"SyndicationRss",
"blog/rss",
new { controller = "Syndication", action = "RssFeed" });
RouteTable.Routes.MapRoute(
"SyndicationAtom",
"blog/atom",
new { controller = "Syndication", action = "AtomFeed" });
}
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment