<%@ page import="com.imcode.imcms.api.*" errorPage="error.jsp" %> <% ContentManagementSystem imcmsSystem = ContentManagementSystem.fromRequest( request ); DocumentService documentService = imcmsSystem.getDocumentService(); int docId = 1189; TextDocument document = documentService.getTextDocument(docId); Template docTemplate = document.getTemplate(); %>

Current template

TextDocument <%=document.getId()%> is shown with the template named "<%= docTemplate.getName() %>"

All templates available for document <%= document.getId() %> (for the current logged in user)

<% TemplateService templateService = imcmsSystem.getTemplateService(); TemplateGroup[] templateGroups = templateService.getTemplatesGroups( document ); for( int i = 0; i < templateGroups.length; i++ ) { TemplateGroup templateGroup = templateGroups[i];%> Template group "<%= templateGroup.getName() %>" has the following templates:
<% } %>