Allright, Jim Macks answer is correct BUT everyone who wants to use this should read this also:
First of all: i was VERY confused that the "internal function" code was not written in Javascript. And it took me a while to figure everything out. Here's my complete working code with only the necessary stuff.
HTML
<article>
<div class="content boxes-3">
<div class="box"></div>
<div class="box text">
<h2>Headline</h2>
<p>Lorem Ipsum Lorem</p>
</div>
<div class="box">
{{#isolate}}{{product id='0001'}}{{/isolate}}
</div>
</div>
</article>
<article>
<div class="content">
<div class="box">{{#isolate}}{{product id='0002'}}{{/isolate}}</div>
</div>
</article>
My article
elements are in another template themselves. Wrapping your products / collection items into {{#isolate}}
will prevent the whole page/template to be rerendered if one product changes. Otherwise all your DOM-changes will be gone if you do something in your own JS-file in document.ready
for example. It's also simply not necessary to rerender the whole (big) template/DOM for one product.
"Products" Template
<template name="Products">
<div id="{{Id}}" class="product-action">
<div class="btn plus">
<i class="icon-remove"></i>
</div>
<div class="info">
<p>{{Desc}}</p>
<p>EUR {{Price}}</p>
</div>
<div class="btn cart">
<i class="icon-shopping-cart"></i>
</div>
</div>
</template>
This of course can look however you want. This is just my version.
Javascript Clientside
Handlebars.registerHelper("product", function(options) {
return recordToTemplate(this, options);
});
var recordToTemplate = function(obj, options) {
var id = options.hash.id;
return new Handlebars.SafeString(Template.Products(Products.findOne({Id: id})));
}
Template.Products.events = {
'click .cart' : function(e) {
// your event code
}, 'click .plus' : function(e) {
// more event code
}
};
I should note, that both, my Collection and my Template for that Collection are named "Products".
Jim Mack has a lot more code in there but frankly i have no idea why. This doesn't mean his code isn't usefull or necessary for something, it just means i have no idea what it does or why it is there (i'm a meteor/handlebars/nodeJS beginner).
Of course keep in mind that maybe this could be done better or in another way. This is just the only way i figured out how to do it with Jim Macks help.