plain single page without any theme etc.

Permalink
hi,

i would like to provide a xml file on my website and as i have to access the c5 api to create the content of this xml file i use a single page. (also the content of the xml is dynamic so i have to generate it on every request),.
but as i run the site of course their gets a lot of html code attached around my generated xml output.
how can i get rid of/deactivate the code which comes from the template, so there is just the my plain xml?

or is there a better way for achieving this instead of using a single page?

thanks a lot?

 
Mnkras replied on at Permalink Reply
Mnkras
so you just want a plain non dynamic xml page? the view.php loads the required header which is a ton of code (loads all libraries)
shorty replied on at Permalink Reply
@Mnkras: I think you did not understand what I want. I just want to render a single page without the headers etc. generated by the view.php. This would make it very easy for generating a DYNAMIC xml file and I would be able to access the c5 api within the single page.

anyway i figured it out by myself.
I don't know if this is a nice solution:
I generate the file I want (could be a xml or whatever) with "print ('<xml>... or similar');" commands.
At the end of the single page I insert "exit;" which means the page gets send to the client immediatly but without letting the view.php sending it's stuff.
so i get a clean xml file.

sorry for my english, but i hope i could help someone
ScottC replied on at Permalink Reply
ScottC
a file under tools directory and accessed using $u = Loader::helper('concrete/urls');
$u->getToolPath('the file name'); or something like that poke around in the elements folder on concrete for the correct code will allow you to have a basically raw page that still has access to the concrete5 api, which is useful for stuff like returning JSON.