I have set some functions in the template's onRendered
hook like this :
Template.PanelLayout.onRendered(function() {
Tracker.autorun(function() {
if (ready.get()) {
page = Pages.findOne({
slug: 'about'
});
tinymce.init({
selector: "#pageContent",
height: 400
});
tinymce.get('pageContent').setContent(page.content);
}
});
});
If I visit that page directly or reload that page these functions will work. But if I visit it by just clicking a link in the navigation, the functions won't load. How can I fix this?