MultiPage Property

I am using the MultiPage property developed by Jeremy Norman and Nick Urry. It works fine when listing related EPi pages. The code I use for this is: relatedPagesContainer.DataSource = ((PropertyMultiPage)CurrentPage.Property["relatedPages"]).SelectedPages; relatedPagesContainer.DataBind(); The only problem is that it doesn't list links to external pages. I tried using ((PropertyMultiPage)CurrentPage.Property["relatedPages"]).SelectedLinkItems, but then I get this error: "Unable to cast object of type 'Intergen.EP.Utils.MultipageLinkItem' to type 'EPiServer.Core.PageData'." How can I list anything else besides EpiServer pages? Thanks in advance :)
Jun 28, 2007 14:32
Hello Steven, I have not worked anything with the linkitems only the epi pages.. but here are my suggestions. I am guessing here that you want the selected pages and the linkitems in same collection? if so you can maybe do like this: PageDataCollection pdc = ((PropertyMultiPage)CurrentPage.Property["relatedPages"]).SelectedPages; Intergen.EP.Utils.MultipageLinkItemCollection itemcol = (PropertyMultiPage)CurrentPage.Property["relatedPages"]).SelectedLinkItems; for(i = 0;i < itemcol.Count;i++) { pdc.Add(new PageData(itemcol[i].PageLink)); } relatedPagesContainer.DataSource = pdc; relatedPagesContainer.DataBind(); (OBS Syntax not tested) You should also be able to use the LinkItemCollection to create a new PageDataCollection if you only want the linkitems in a seperate container. That might work or atleast give you some ideas how to solve your issue.
Jun 29, 2007 8:22
They are not in the same list actually. But will see if I can use your code in some way.
Sep 06, 2007 15:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.