I use this code (in the /head tab of the edit CSS/HTML customisation page) to add some additional items to the menu, however it’s stopped working after a recent update - anybody know why?
<script>
Discourse.ExternalNavItem = Discourse.NavItem.extend({
href : function() {
return this.get('href');
}.property('href')
});
I18n.translations.en.js.filters.first_name_here = { title: "Name", help: "Name again" };
I18n.translations.en.js.filters.second_name_here = { title: "Name", help: "Visit our...." };
I18n.translations.en.js.filters.tags = { title: "Tags", help: "Tags" };
Discourse.NavItem.reopenClass({
buildList : function(category, args) {
var list = this._super(category, args);
if(!category) {
list.push(Discourse.ExternalNavItem.create({href: 'http://forum.com/tags', name: 'tags'}));
list.push(Discourse.ExternalNavItem.create({href: 'https://forum.com/something', name: 'name'}));
list.push(Discourse.ExternalNavItem.create({href: 'https://forum.com/t/thread-url/193454#heading--name', name: 'name'}));
}
return list;
}
});
</script>