ASPX templates
Version 4.x > ASPX templates > Problem with displaying related documents and Caching View modes: 
User avatar
Member
Member
kentico-eg-consulting - 7/17/2009 11:00:35 AM
   
Problem with displaying related documents and Caching
I'm having a problem with displaying related documents when Cache Content > 0

I have

<cc1:CMSRepeater ID="rptPopularMenuItemsLinksHome" runat="server" Path="%" RelatedNodeIsOnTheLeftSide="true"
RelationshipName="isrelatedto" ClassNames="CMS.MenuItem" TransformationName="CMS.MenuItem.SimpleList"
OrderBy="NodeOrder">
</cc1:CMSRepeater>

TreeProvider tree = new TreeProvider();
CMS.TreeEngine.TreeNode homeNode = tree.SelectSingleNode(CMSContext.CurrentSiteName, "/home", TreeProvider.ALL_CULTURES);

rptPopularMenuItemsLinksHome.StopProcessing = false;
rptPopularMenuItemsLinksHome.RelationshipWithNodeGuid = homeNode.NodeGUID;
rptPopularMenuItemsLinksHome.ReloadData(true);


It works perfectly fine when Cache content is 0, but when set to anything else the repeater displays far too many items (i think it maybe all nodes)

Any ideas, thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/28/2009 8:45:24 AM
   
RE:Problem with displaying related documents and Caching
Hi Paul,

your repeater needs to have StopProcessing property as true. For example:


<cc1:CMSRepeater ID="rptPopularMenuItemsLinksHome" runat="server" Path="%" RelatedNodeIsOnTheLeftSide="true"
RelationshipName="isrelatedto" ClassNames="CMS.MenuItem" TransformationName="CMS.MenuItem.SimpleList"
OrderBy="NodeOrder" StopProcessing="true">
</cc1:CMSRepeater>


Best regards,
Helena Grulichova