음, 해결책을 만들어 봤는데 잘 작동하는 것 같아요. 제가 제대로 한 건가요, 아니면 뭔가 잘못된 걸까요? ![]()
<script type="text/discourse-plugin" version="0.8">
// Modify the topic route.
api.modifyClass('route:topic', {
beforeModel( transition ) {
var params = this.paramsFor('topic');
// English
if( params['id'] == 123 ) {
this.router.transitionTo('/c/tutorials/english/29'); // Implicitly aborts the on-going transition.
}
// French
if( params['id'] == 456 ) {
this.router.transitionTo('/c/tutorials/french/30'); // Implicitly aborts the on-going transition.
}
}
});
</script>