Dynamic Routing Beta: Reordered router hierarchy
refs #9601 - static routes are stronger than taxonomy
This commit is contained in:
parent
3cdff10350
commit
d0f2b3e7ad
14
core/server/services/routing/bootstrap.js
vendored
14
core/server/services/routing/bootstrap.js
vendored
@ -32,13 +32,6 @@ module.exports = function bootstrap() {
|
||||
|
||||
const dynamicRoutes = settingsService.get('routes');
|
||||
|
||||
_.each(dynamicRoutes.taxonomies, (value, key) => {
|
||||
const taxonomyRouter = new TaxonomyRouter(key, value);
|
||||
siteRouter.mountRouter(taxonomyRouter.router());
|
||||
|
||||
registry.setRouter(taxonomyRouter.identifier, taxonomyRouter);
|
||||
});
|
||||
|
||||
_.each(dynamicRoutes.routes, (value, key) => {
|
||||
const staticRoutesRouter = new StaticRoutesRouter(key, value);
|
||||
siteRouter.mountRouter(staticRoutesRouter.router());
|
||||
@ -46,6 +39,13 @@ module.exports = function bootstrap() {
|
||||
registry.setRouter(staticRoutesRouter.identifier, staticRoutesRouter);
|
||||
});
|
||||
|
||||
_.each(dynamicRoutes.taxonomies, (value, key) => {
|
||||
const taxonomyRouter = new TaxonomyRouter(key, value);
|
||||
siteRouter.mountRouter(taxonomyRouter.router());
|
||||
|
||||
registry.setRouter(taxonomyRouter.identifier, taxonomyRouter);
|
||||
});
|
||||
|
||||
_.each(dynamicRoutes.collections, (value, key) => {
|
||||
const collectionRouter = new CollectionRouter(key, value);
|
||||
siteRouter.mountRouter(collectionRouter.router());
|
||||
|
Loading…
Reference in New Issue
Block a user