Hi I’m new in Meteor and starting to build my first Meteor App
After reading several topic, I decided to use FlowRouter/BlazeLayout. I still confused how to deal with data context
I have a list of dummy post. I name it rhid
. Here’s the screenshot:
I click the dummy post The Amazing Mars Moon Race
. It deliver the right path with wrong data as screenshot below:
This apply to all my dummy posts. No error in chrome and terminal console.
My router:
FlowRouter.route('/rhid', {
action: function () {
BlazeLayout.render('layout', { top: "top", main: "rhidList", bottom: "bottomRhid" });
}
})
FlowRouter.route('/rhid/:id', {
name: 'rhidQuote',
action: function () {
BlazeLayout.render('layout', { top:"top", main: "rhidQuote", bottom: "bottomRhid" });
}
})
Here’s rhidQuote
’s template:
<template name="rhidQuote">
<a href="{{rhids._id}}/read">
<img class="ui fluid image" src="/uploads/{{rhids.quote}}">
</a>
</template>
Here’s rhid
’s helper:
Template.rhidQuote.helpers({
rhids: function () {
return Rhids.findOne();
}
});
I hope someone could give me some clues what I’m missing
Thanks you very much. Appreciated for your help