Pagination of localized Taxonomy Term and also a HQLQuery result

Topics: General
Aug 18, 2014 at 6:28 PM

How would I go about using Orchard's pagination model to paginate the localized Term of a Taxonomy. Currently it returns all items, not just the current Culture that the website is set to. This makes the Pager model show more items than it is supposed to, 4 instead of 2 for instance.

Also, how would I use the Pager model to display pagination for a non-standard content listing. For instance, and I hope this makes sense, to a list of items:

var items = Model.Content.Items[0].ContentItems.ContentItems.Items;

and to a HqlQuery:

dynamic newsListing = contentManager.HqlQuery().ForType("BlogPost").ForVersion(VersionOptions.Published).Where(alias => alias.ContentPartRecord<TermsPartRecord>().Property("Terms", "terms"), pr => pr.Eq("TermRecord", categoryId)).Slice(count, 10).ToList();

I might not be explaining myself too well, as I am relatively new to Orchard, so please let me know if I am missing the plot completely.