首先,感谢大家为本论坛所做的努力。
我有这种情况:
- mysite.com/authors(作者列表)
- mysite.com/author/1(作者 1)
- mysite.com/book/1(作者 1 的书 1)
- mysite.com/cart/1(作者 1 的书 1 的购物车页面)
我需要这样的网址:
mysite.com/author/1/1/cart
但我不想要嵌套模板(每个页面都是不同的,我不想在许多页面中使用相同的信息)。
有没有办法拥有那个网址?
我实际的router.js是这样的:
Router.map(function() {
this.route('index', {path: '/'});
this.route('login');
this.route('authors', {path: '/authors'});
this.route('author', {path: '/author/:author_id'});
this.route('book', {path: '/book/:book_id'});
this.route('cart', {path: '/cart/:cart_id'});
});