mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 20:18:23 -05:00
DEV: Use category ids in URLs preferentially
This commit is contained in:
@@ -144,7 +144,7 @@ export default ComboBoxComponent.extend({
|
||||
} else {
|
||||
const category = Category.findById(parseInt(categoryId, 10));
|
||||
const slug = Category.slugFor(category);
|
||||
categoryURL = Discourse.getURL("/c/") + slug;
|
||||
categoryURL = Discourse.getURL(`/c/${slug}/${categoryId}`);
|
||||
}
|
||||
|
||||
DiscourseURL.routeTo(categoryURL);
|
||||
|
||||
@@ -84,7 +84,7 @@ export default ComboBoxComponent.extend(TagsMixin, {
|
||||
let url = "/tags";
|
||||
|
||||
if (currentCategory) {
|
||||
url += `/c/${Category.slugFor(currentCategory)}`;
|
||||
url += `/c/${Category.slugFor(currentCategory)}/${currentCategory.id}`;
|
||||
}
|
||||
|
||||
return Discourse.getURL(`${url}/none`);
|
||||
@@ -162,7 +162,9 @@ export default ComboBoxComponent.extend(TagsMixin, {
|
||||
url = "/tags";
|
||||
|
||||
if (this.currentCategory) {
|
||||
url += `/c/${Category.slugFor(this.currentCategory)}`;
|
||||
url += `/c/${Category.slugFor(this.currentCategory)}/${
|
||||
this.currentCategory.id
|
||||
}`;
|
||||
}
|
||||
|
||||
url = Discourse.getURL(`${url}/${tagId.toLowerCase()}`);
|
||||
|
||||
Reference in New Issue
Block a user