- templateContext["albums"] = albums
- templateContext["albumPagination"] = Pagination(albums, 12).setPage(request.parameters["page"]?.toIntOrNull() ?: 0)
+ Pagination(albums, webInterface.core.preferences.imagesPerPage).apply { page = freenetRequest.parameters["page"]?.toIntOrNull() ?: 0 }.also { pagination ->
+ templateContext["albumPagination"] = pagination
+ templateContext["albums"] = pagination.items
+ }