cancel
Showing results for 
Search instead for 
Did you mean: 

Applying templates to external view

spazzm
Champ in-the-making
Champ in-the-making
Hi,
how can I apply a template to my content in the external view?

When viewing content details using the Alfresco UI there is a 'View in Browser' link on the top lefthand corner - how can I have a template applied to this view?

My content is in the form of XML files, and a lot of information is also stored in the content properties. How can I display this with a template applied without having the user navigate through the menus of the Alfresco UI, and without displaying the Alfresco UI adornments?

Let's say, for example, that I want to view the content (an xml file) stored at
http://example.com/alfresco/download/direct/workspace/SpacesStore/2203ba7d-d800-11da-8f37-6fd510b514...
using the template (an .ftl file) stored at
http://example.com/alfresco/download/direct/workspace/SpacesStore/c4215a59-b960-11da-906c-edb783f6d2...

How would I do this?
Do the template and content need to be in the same space?
1 REPLY 1

kevinr
Star Contributor
Star Contributor
You can use the Template Servlet to render the output from a template applied to a document. The servlet will output directly to the the response stream and so there will be no Alfresco UI adornments.

See the examples and info on this wiki page:
http://wiki.alfresco.com/wiki/URL_Addressability#TemplateContentServlet

Thanks,

Kevin