0

I have created a website with piranha CMS and a custom routing class. The links in the RSS flow is now broken. Can I change or turn off the default RSS solution?

I tried to solve this problem by creating a controller that returns an RSS feed with the correct links. In RouteConfig I added this map route:

routes.MapRoute (
                 name: "rss"
                 url: 'rss'
                 defaults: new {controller = "RSS", action = "Index"},
                 namespaces: new [] {"onceuponatime.Controllers"}
             );

But when http://mywebsite.com/rss called, it's still the default solution that is shown.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Zaint
  • 59
  • 6

1 Answers1

1

When the application starts a number of default request handlers are registered, among them the RssHandler. You can disable it by adding the following statement in you startup code, like Global.asax.cs:

Piranha.Application.Current.Handlers.Remove("RSS") ;

This will disable the default implementation and let you handle calls for /rss yourself.

Laurel
  • 5,965
  • 14
  • 31
  • 57
Håkan Edling
  • 2,723
  • 1
  • 12
  • 15