I'm looking for the best approach to achieve following task with MeteorJS.
Requirements are as follows: list with items, and side bar with selected item (not necessary from current page of the list).
I need to send two pieces of the same Items collection to the client:
- items for current page of the list
- one item for the side bar
What dance with publications/subscriptions should I perform?
This is not obvious to me how to do this correctly.
Currently I've added two publications for the list and selected item, subscribed to both of them on the client side. And as a result when I do Items.find() on the client to fill the list, it returns me list page items + selected item ("Item 5" appears on the first page).
It is OK when selected item should be on current page of the list ("Item 2"), but it is NOT OK when selected item should not be there and it's added to the current page anyway ("Item 5").