Created
December 23, 2014 16:31
-
-
Save james-dibble/b5ffc3da5b4cbb6072cc to your computer and use it in GitHub Desktop.
Umbraco startup class to add routes for Syndication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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