ASPX templates
Version 3.x > ASPX templates > sorting of custom document types inside a template View modes: 
User avatar
Member
Member
elp-gmx - 3/26/2009 8:44:42 AM
   
sorting of custom document types inside a template
hello,

i have a problem concerning customized document types - i have a master template with two repeaters, which are iterating over customized document types. these document types are sortable ínside the repeater - but what i want now, is that the document types should be generally sortable (no matter, which concrete document type):


<!-- 100% 2 cols -->
<cc1:CMSRepeater ID="contentBlock2Cols" HideControlForZeroRows="true" runat="server"
ClassNames="cms.myContentClass" TransformationName="cms.myContentClass.default"
ItemSeparator="" ShowEditDeleteButtons="True" OnItemDataBound="contentBlock_OnItemDataBound"
OrderBy="NodeOrder" />
<!-- 100% 1 cols -->
<cc1:CMSRepeater ID="contentBlock1Col" HideControlForZeroRows="true" runat="server"
ClassNames="cms.myContentClass2" TransformationName="cms.myContentClass2.default"
ItemSeparator="" ShowEditDeleteButtons="True" OnItemDataBound="contentBlock_OnItemDataBound"
OrderBy="NodeOrder" />


i am using ASPX template development, current version of kentico is 3.0

thankyou for your support...
elmar

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/2/2009 7:39:20 AM
   
RE:sorting of custom document types inside a template
Hello,

you could use both document types in one repeater. Class names could be for example: "cms.news;cms.article".

The only problem could be the transformations. You could the generic transformation for both document types. It could look like e.g.:

<%# Eval("ComputerName1") %> <%# Eval("ComputerName2") %>

If the current document type does not contain ComputerName2 attribute it ignores this Eval command and displays only ComputerName1.

Best regards,
Helena Grulichova