<%@ page import="com.imcode.imcms.api.*"%> <% ContentManagementSystem imcms = ContentManagementSystem.fromRequest( request ); TemplateService templateService = imcms.getTemplateService(); TemplateGroup[] templateGroups = templateService.getAllTemplateGroups() ; %> Templates and template groups All Template groups and theirs templates:

<% int templateGroupId = 0; int templateId = 1; %> The template group with id <%= templateGroupId %> has the name "<%= templateService.getTemplateGroupById( templateGroupId ).getName()%>"
The template with id <%= templateId %> has the name "<%= templateService.getTemplateById( templateId ).getName()%>"

<% String templateName = "demo"; %> The template with name "<%= templateName %>" has the id <%= templateService.getTemplate( templateName ).getId()%>