ASPX templates
Version 5.x > ASPX templates > how to show related News at only news detail page View modes: 
User avatar
Member
Member
manish.kyal-octalsoftware - 11/28/2011 3:26:18 AM
   
how to show related News at only news detail page
<cms:cmsrepeater id="repItems" runat="server" path="/Press-Room/%" classnames="CMS.News" enableviewstate="false"
orderby="NewsReleaseDate DESC" transformationname="CMS.News.NewsWithSummary"
selecteditemtransformationname="CMS.News.NewsDetail" />

i use this in custome template how to find when user are in news detail page and show to show related news

User avatar
Certified Developer 9
Certified Developer 9
charbf - 11/28/2011 11:07:12 AM
   
RE:how to show related News at only news detail page
Hi,

you can add a repeater that is only visible to specific document type (CMS.News in your case)

Francois

User avatar
Member
Member
manish.kyal-octalsoftware - 11/28/2011 11:20:53 PM
   
RE:how to show related News at only news detail page
thanks for reply if you have any simple code please send me

User avatar
Certified Developer 9
Certified Developer 9
charbf - 11/29/2011 8:33:56 AM
   
RE:how to show related News at only news detail page
Hi,

I have no sample code. but you can use the Related Documents webpart

User avatar
Member
Member
kentico_michal - 11/30/2011 3:46:41 AM
   
RE:how to show related News at only news detail page
Hello,

If you need sample code, you can take a look at the implementation of the Related documents web part that is located here: ~\Viewers\Documents\relateddocuments.ascx.cs.

Best regards,
Michal Legen