mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 08:06:56 +08:00
A mucher saner API for updating the title of routes, even when nested.
Properly sends the title of the page to google analytics
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
var ApplicationRoute = Em.Route.extend({
|
||||
|
||||
siteTitle: Discourse.computed.setting('title'),
|
||||
|
||||
actions: {
|
||||
_collectTitleTokens: function(tokens) {
|
||||
tokens.push(this.get('siteTitle'));
|
||||
Discourse.set('_docTitle', tokens.join(' - '));
|
||||
},
|
||||
|
||||
showTopicEntrance: function(data) {
|
||||
this.controllerFor('topic-entrance').send('show', data);
|
||||
},
|
||||
|
Reference in New Issue
Block a user