#54 Use 'last' instead of 'earlyItems'

Open
opened 1 year ago by fr33domlover · 0 comments

In Vervis I have a property earlyItems, I think it's mentioned somewhere in the forum too. I just had a little idea about it and I want to document it before I forget.

The current setup: Given an ordered collection of X items, of which you wish to provide only the first A items and the last B items (A+B < X), orderedItems/items would be used for the last B items, and custom earlyItems property for the first A items.

The new idea: Use a "fake" paged collection that has only first and last, both mapping to OrderedCollectionPage objects. That's more cumbersome but removes the need for a custom earlyItems property.

That's all, I'll examine this idea when I review the open issues/topics about earlyItems :)

In Vervis I have a property `earlyItems`, I think it's mentioned somewhere in the forum too. I just had a little idea about it and I want to document it before I forget. The current setup: Given an ordered collection of X items, of which you wish to provide only the first A items and the last B items (A+B < X), `orderedItems`/`items` would be used for the last B items, and custom `earlyItems` property for the first A items. The new idea: Use a "fake" paged collection that has only `first` and `last`, both mapping to `OrderedCollectionPage` objects. That's more cumbersome but removes the need for a custom `earlyItems` property. That's all, I'll examine this idea when I review the open issues/topics about `earlyItems` :)
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.