Soo new day new problem (: I did this all day long and slowly I became crazy … so the problem is as follows:
I use reactive table with a field called :
{
key: 'status',
label: 'Status',
tmpl: Template.Status
},
so that I can use my Template Status:
<template name="Status">
<div class="circle"><i class="fa fa-coffee"></i></div>
<div class="circle"><i class="fa fa-sun-o"></i></div>
<div class="circle"><i class="fa fa-moon-o"></i></div>
<div class="circle"><i class="fa fa-star"></i></div>
</template>
I wrote a helper
Template.Status.helpers({
medicationPlanStatus : function () {
return MedicationPlan.find({})
}
});
to get my collection ( and it finds it)
but when I try to adress the fields like {{activeSubstance}}
e.g.
<template name="Status">
<div class="circle"><i class="fa fa-coffee"></i></div>
<div class="circle"><i class="fa fa-sun-o"></i></div>
<div class="circle"><i class="fa fa-moon-o"></i></div>
<div class="circle"><i class="fa fa-star"></i></div>
{{activeSubstance}}
</template>
I get nothing but with a {{#each}}
I set the data context but for every activesubstance, this is somehow what I want… {{#with}}
wont work to just gimme 1 activeSubstance and not all for every patient. Any ideas?
{{firstName}}
and everything works fine but because it is the default-collection I have included like:
<template name="patients">
{{> reactiveTable collection=patientList settings=tableSettings}}
{{> editPatientModal}}
{{> deletePatientModal}}
{{firstName}}
</template>
with the helper:
Template.patients.helpers({
patientList: function () {
return Patients.find({})
}
});
I tried this solution:
Template.patients.helpers({
patientList: function () {
return Patients.find({}) && MedicationPlan.find({})
}
});
but this is a mess… But otherwise I have access like {{activeSubstance}}
Any ideas so far? If you need more information let me know (: thanks for reading