Hi,
categories - do you mean categories which you can select in Properties of document, in Categories tab or it is just a folder name in the content tree?
In case of folder you could use a universal viewer.
In the first case you can use for example a repeater with a custom query web part. The main query would be to the CMS_Category table (it will select category name and its ID).
To the transformation which displays Category name you can insert another control which will display documents for example a data list control:
<cc1:CMSDataList ID="CMSDataList1" runat="server" ClassNames="cms.article" Path='<%# Eval("NodeAliasPath") %>'
TransformationName="cms.article.default" RepeatColumns="2" >
</cc1:CMSDataList>
<script runat="server">
protected void Page_PreRender(object sender, EventArgs e)
{
CMSDataList1.ReloadData(true);
}
</script>
To make sure that control displays only documents from correct category, you need to define its Where condition:
DocumentId NOT IN (SELECT DocumentId FROM CMS_DocumentCategory WHERE CategoryId = 6)The number of category will be available using:
<%# Eval("CategoryID")%>Best regards,
Ivana Tomanickova