Hi,
we are using an ItemPublisher that is using the "Select items under the following pages" option to pick items.
Using this code in the list: @using Dynamicweb.Modules.UserManagement; @using Dynamicweb.Modules.Common.CustomFields; <div class="items"> @functions{ public static CustomFieldValue GetUserCustomFieldValue(string systemName) { return (from u in User.GetCurrentUser().CustomFieldValues where u.CustomField.SystemName == systemName select u).FirstOrDefault(); } } @{ @*<pre>@string.Join("\n", Values.Select(e => string.Format("{0}: {1}", e.Key, System.Web.HttpUtility.HtmlEncode(e.Value))).ToArray())</pre>*@ var hasItems = GetBoolean("ItemPublisher:Items.Any"); var cfvBranschspar = GetUserCustomFieldValue("AccessUser_Branschspar"); var branschspar = cfvBranschspar != null ? cfvBranschspar.Value as string : "null"; } @if (hasItems) { var list = GetLoop("ItemPublisher:Items.List"); // For testing <pre>@list.Count</pre> @*<pre>@string.Join("\n", Values.Select(e => string.Format("{0}: {1}", e.Key, System.Web.HttpUtility.HtmlEncode(e.Value))).ToArray())</pre>*@ foreach (var item in list) { @*<pre>@string.Join("\n", item.Values.Select(e => string.Format("{0}: {1}", e.Key, System.Web.HttpUtility.HtmlEncode(e.Value))).ToArray())</pre>*@ if (branschspar == item.GetString("ItemPublisher:Item.Title")) { var itemTitle = item.GetString("ItemPublisher:Item.Title"); var itemTitleShort = itemTitle; if (itemTitle.Length > 20) { itemTitleShort = itemTitle.Substring(0, 17) + ".."; } var starttid = item.GetDate("ItemPublisher:Item.Starttid"); var sluttid = item.GetDate("ItemPublisher:Item.Sluttid"); <div data-role="collapsible" data-inset="false" data-collapsed-icon="carat-r" data-expanded-icon="carat-l"> <h3 data-starttime="@starttid.ToString("yyyy/MM/dd HH:mm")" data-endtime="@sluttid.ToString("yyyy/MM/dd HH:mm")" class="defattalize"><span class="eventTime">@starttid.ToString("HH:mm") - @sluttid.ToString("HH:mm")</span> @itemTitleShort</h3> <div class="eventTitle">@itemTitle</div> <div class="eventDetails">@starttid.ToString("HH:mm") - @sluttid.ToString("HH:mm") (@item.GetString("ItemPublisher:Item.Plats"))</div> <p> @item.GetString("ItemPublisher:Item.BeskrivandeText")<br /><br /> </p> </div> } } } </div>
If we add just one page with 3-4 items in the "Select items under.." options. Everything is peachy and the right item is selected.
But when the number of total items rises to above 10 only 10 are in the loop and it's abit random if my item is among those 10.
Can anyone shed some light on this?