You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with getting all content of a certain type. In V7 the ContentService had GetContentOfContentType(), however that does not exist in V8. Therefore I decided to try and be creative with GetPagedOfType(). Unfortunately the collection returned does not contain any items.
It's because you are passing in 1 for the pageIndex parameter. Being an index it is zero based. So you are asking for page #2 by passing in 1 and you only have 2 records.
Could have been nice to just request using something like var products = _contentService.GetPagedOfType(productTypeId, PagingInfo.AllItems, out var size, null);
I was playing around with getting all content of a certain type. In V7 the ContentService had GetContentOfContentType(), however that does not exist in V8. Therefore I decided to try and be creative with GetPagedOfType(). Unfortunately the collection returned does not contain any items.
Reproduction
Expected result
I expect that
products
contains a collection of products (if there are any) and thatsize
contains the amount of records.Actual result
While
size
does show the correct amount of records, the collection does not contain any products.The text was updated successfully, but these errors were encountered: