Question

I'm trying to make a multiple collection example to work but unfortunately it doesn't. I've got data1 and data2 collection to show on "/data1/page/1" and "/data2/page/1" respectively. Only data2 collection appears on both pages. Any ideas?

Here's the codes: https://github.com/ianpogi5/meteor-pages/tree/master/examples/multi-collection

Was it helpful?

Solution

I came across this package recently, and started implementing today. I ran into the same issue. As far as I can tell...

The predefined template _pagesNavCont uses the object pagesData to construct the page links. When you initialize the data1 pagination object, pagesData corresponds to the path for data1. Unfortunately, whatever is initialized last (in this case data2) determines the data in pagesData for the _pages* templates.

I would imagine that you'd need to either hack the original code, or define your own templates for _pagesNavCont, _pagesPageCont, and _pagesItemDefault for one of the collections.

I've forked the code, and am going to continue looking into the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top