A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
" alt="" class="image floatLeft" />
((EPiServer.Core.PageData)getArticle())["MainIntro"]%>
Les mer
The problem here is that you call the getArticle() function at least 5 times (when debugging it actually called it 10 times). So that is not very efficient. Possible solutions - 2 ----------------------- I create a PageDataCollection and use GetChildren to populate it. Then delete all children except the one I have referenced in selectedArticle property.<%=((episerver.core.pagedata)getarticle())["pagename"]%>%=((episerver.core.pagedata)getarticle())["pagename"]%>
PageData pd = GetPage(new PageReference(CurrentPage.Property["articleRotation"].ToString())); PageDataCollection pdc = GetChildren(pd.PageLink); foreach (PageData data in pdc) { if (pd.PageLink != data.PageLink) pdc.Remove(data); } return pdc;I have not tested this code, so I don't know if it works.