cancel
Showing results for 
Search instead for 
Did you mean: 

mime type for 'preview in template'

ftoth
Champ in-the-making
Champ in-the-making
Hi,

It appears that the "preview in template" function always serves HTML (mime type text/html).

Is this correct? Suppose I created a freemarker template that generated custom XML. Is there any way to change the mime type that's served when the user previews with that template?

Thanks,

Fred
1 REPLY 1

kevinr
Star Contributor
Star Contributor
The Preview In Template function is only for displaying HTML templates - as the output is embedded in the standard Alfresco UI HTML page output so XML wouldn't display correctly anyway. However you can use the TemplateContentServlet to form URLs that output template content with any mimetype (this is how the RSS templates output xml).

Thanks,

Kevin