Is it possible to serve the same page through different templates? I would like to be able to query a url with a param and have it return the page as xml instead of the regular html.
What would be the easiest way to do this?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 05, 2008 8:13pm
Subscribe [1]#1 / Feb 05, 2008 8:13pm
Is it possible to serve the same page through different templates? I would like to be able to query a url with a param and have it return the page as xml instead of the regular html.
What would be the easiest way to do this?
#2 / Feb 05, 2008 8:38pm
Sure, just set up an XML template with the data you want, and link to it from your normal template. You can use segments to duplicate the URL, or if you’re in a weblog entries tag, your weblog entries variables.
Going to move this down to How To for you.