Hi,
We are trying to get the pageID in an item list loop (website properties), but it comes out empty.
foreach(var pages in GetLoop("Item.Area.FooterPages"))
{
<div>@RenderPageContent(GetString("Item.Area.Social.Field.PageId"))</div>
}
So then we tried to get the raw value and split the value
but got duplicate values from time to time (weird), so had to get the Distinct values
string str_footerPages = GetString("Item.Area.FooterPages");
foreach(var pages in str_footerPages.Split(','))
{
string str_id = Dynamicweb.Content.Items.ItemManager.Storage.GetById("FooterPages", pages.ToString())["Page"].ToString();
<div>@RenderPageContent(Int32.Parse(str_id))</div>
}
But got duplicate values from time to time (weird), so had to get the Distinct values
foreach(var pages in str_footerPages.Split(',').Distinct())
{
...
}
Are these known bugs, or are we doing something wrong?