Hey
Swift uses the RenderItemList, and I need to add a filter on it to ignore items which have a publish time set in the future, which works by adding this filter:
string filter = "PublishTime is before " + DateTime.Now.ToString("yyyy-MM-dd");
However, I would also like it to not filter out any where the date is unset or equal to DateTime.MinValue. - how do I achieve this? The documentation on the wording needed for the filter seems to have been lost in an update :)
For reference sake: If I do it directly in the ItemPublisher template, it looks like this: ".Where(x => x.GetDate("ItemPublisher:Item.PublishTime") == DateTime.MinValue || x.GetDate("ItemPublisher:Item.PublishTime") < DateTime.Now)", however - at this point it has already applied the before mentioned filter, so it is ofc. to late to add it here.
(Code just fyi):
@RenderItemList(new {
ItemType = itemType,
ListTemplate = "ItemPublisher/List/" + listTemplate + ".cshtml",
ItemFieldsList = "*",
ListSourceType = "Page",
ListSourcePage = listSource,
ListPageSize = maxItemsInList,
IncludeParagraphItems = false,
ListOrderBy = listOrderBy,
ListSecondOrderBy = listOrderBySecond,
ListOrderByDirection = articleListSortOrder,
Filter = filter
})