November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I assume (havn't tested it) that this code would do the trick:
PageData newPage = EPiServer.DataFactory.Instance.GetDefaultPageData(parentId, "pageTypeWithLinkColProperty");
LinkItemCollection linkCol = new EPiServer.SpecializedProperties.LinkItemCollection();
LinkItem item = new LinkItem();
item.Href = page.LinkURL;
item.Text = page.PageName;
item.Title = page.PageName;
item.Target = "_self";
linkCol.Add(item);
newPage.Property["MyLinkItemCol"].Value = linkCol;
// set other required property values and save page
Dear All,
Has anyone created the Link Collection Property dynamically through code behind. My problem is, I need to create Epi-Server Pages Dynamically, which also contains a link collection property and i need to popuplate them dynamically on the fly.
Please if some one help and send me the code.
Thanks in advance.
Tony