Passing subscription data through templates

Hi, sorry for my english.

The problem:

I have template “tempA” subscribe to “subs1”. From tempA I create dynamically “tempB” (Blaze.render) then I have to subscribe to “sub1” again and wait for finish?

There is a way to use data from subs1 of tempA in tempB?

Thanks and sorry for my english again.

When you subscribe to “subs1” in template “tempa”, the data is available to all the other templates by default. You don’t need to subscribe in any other templates. Just subscribe in one template and use the data wherever you want.

After all it’s not the subscription that you want to access from other templates, but collections in Minimongo, which are global.

oh thanks for your quick answer.

That what I think, but in my code (that I have to check) is not working in that way. I made a gist for probe my point, but surprise it working fine. Then the problem is in my original code.

Thanks again

Rady i found the bug.

in the tempB the data is available, but in onRenderd of tempB I made a subscription to the data again (that because I’m not always render tempB from tempA). then temB have to wait for subscription ready.

Solution I have to figure out if subscription is already made before subscribe again. I not really sure that behavior is wright.
I can find a situation where i need to subscribe again, then I think about open a issue in meteor.

Whatever thanks again.

In such a case, you don’t do next subscription. You just change the value of the parameter that you pass to your previous subscription, and the subscription will automagically reload.