Thanks for your replies,
Toby Unfortunately it still breaks the Flarum menu and doesnt navigate to users profile etc when clicking the links in the dropdown of the user when checking the instance. I do however get the currentTag. The only problem is that the links stop working and that the menu breaks when clicking on them.
This is the code im using atm:
override(IndexPage.prototype, 'view', function(view){
var newView = view();
var tagName = m.route().split("/").pop();
var discussionsCount = app.cache.discussionList.discussions.length;
var currentTag;
if (app.current instanceof IndexPage) {
currentTag = app.current.currentTag();
}
newView.children[0] =
<div class="container">
<div class="mdl-grid" style="border-bottom: 1px solid #7c7c7c">
<div class="mdl-cell mdl-cell--2-col"></div>
<div class="mdl-cell mdl-cell--10-col">{currentTag.data.attributes.description}</div>
</div>
</div>
return newView;
});
It seems like it only breaks when running app.current.currentTag() before the window load event. If I check for the load event everything works if I remove this in the view: {currentTag.data.attributes.description}
Should it not be possible to do it this way? Should I instead insert values from currentTag with a traditional document.getElementByid(id).innerHTML or with m.render for example?