Developer forum

Forum » Development » Overriding the template layout

Overriding the template layout


Reply

In the RSS module it is possible to publish an rss feed directly on a page without having to make a new master template for the xml data.


How would I do that with a module?


An example would be that i made a flash slideshow module on a page:


example.aspx?ID=1234


Then I want my module to get some xml data from the same page just by adding a query string:


example.aspx?ID=1234&output=xml


To do that I need to bypass all the master/page template rendering, and just ouyput my own data.


But how?


Replies

 
Nicolai Høeg Pedersen
Reply

From anywhere you can just clear the response and make it send out XML:


 


HttpContext.Current.Response.Clear()


HttpContext.Current.Response.ContentType = "text/xml"


HttpContext.Current.Response.Write("")


HttpContext.Current.Response.End()

 

You must be logged in to post in the forum