J’utilise ce code (dans l’onglet /head de la page de personnalisation CSS/HTML) pour ajouter quelques éléments supplémentaires au menu, mais cela a cessé de fonctionner après une mise à jour récente. Quelqu’un sait pourquoi ?
<script>
Discourse.ExternalNavItem = Discourse.NavItem.extend({
href : function() {
return this.get('href');
}.property('href')
});
I18n.translations.en.js.filters.first_name_here = { title: "Nom", help: "Nom à nouveau" };
I18n.translations.en.js.filters.second_name_here = { title: "Nom", help: "Visitez notre..." };
I18n.translations.en.js.filters.tags = { title: "Étiquettes", help: "Étiquettes" };
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: 'nom'}));
list.push(Discourse.ExternalNavItem.create({href: 'https://forum.com/t/thread-url/193454#heading--name', name: 'nom'}));
}
return list;
}
});
</script>