ASPX templates
Version 6.x > ASPX templates > CMSRepeater starting from second item View modes: 
User avatar
Certified Developer 9
Certified Developer 9
TL - 9/30/2012 3:31:02 PM
   
CMSRepeater starting from second item
Is there a way how to force CMSRepeater to start from second (third...) item? I can use SelectTopN to show only given number of item, but if I don't want to show the first item?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 10/1/2012 3:05:36 AM
   
RE:CMSRepeater starting from second item
Hello,

You can use the following code as the example which select TOP N (in this example TOP 1) document(s) from the News table and the condition NOT IN defines that it won't be displayed, so if you want to start from the third you set TOP 2 etc.
DocumentID NOT IN (SELECT TOP 1 DocumentID FROM [View_CONTENT_News_Joined] WHERE NodeSiteID={%NodeSiteID%})
Please, also don't forget to set the right NodeSiteID.

Best regards,
Martin Danko

User avatar
Certified Developer 9
Certified Developer 9
TL - 10/1/2012 1:05:33 PM
   
RE:CMSRepeater starting from second item
Thank you for the answer, but where should I use this code?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 10/3/2012 3:52:36 AM
   
RE:CMSRepeater starting from second item
Hi,

You should place this code in the WebPart properties -> Content Filter -> WHERE condition field.

Best regards,
Martin Danko