%@ page import="com.imcode.imcms.api.*"%>
<%
ContentManagementSystem imcms = ContentManagementSystem.fromRequest( request );
DocumentService documentService = imcms.getDocumentService();
CategoryType[] categoryTypes = documentService.getAllCategoryTypes() ;
%>
Categories and their types
All categories that exists in the system:
<%
for (int i = 0; i < categoryTypes.length; i++) {
CategoryType categoryType = categoryTypes[i];
%>
- Category type name "<%= categoryType.getName() %>", id = <%=categoryType.getId()%>
<%
Category[] categories = documentService.getAllCategoriesOfType(categoryType);
for (int j = 0; j < categories.length; j++) {
Category category = categories[j];
%>- Category name "<%= category.getName() %>", id = <%=category.getId()%>
<%
}
%>
<%
}
%>