Closed The-Code-Monkey closed 5 years ago
@The-Code-Monkey for this cases you should use this construction rule:
const paramsConfig = {
'/courses/:category/:course': [{
category: 'unknown1',
course: 'third-project'
}, {
category: 'unknown2',
course: 'fourth-project'
}],
};
If you have 3 or more dynamic route parts, the rules will look like this:
const paramsConfig = {
'/courses/:category/:course/:thirdDynamicPart': [{
category: 'unknown1',
course: 'third-project',
thirdDynamicPart: 'something'
}, {
category: 'unknown2',
course: 'fourth-project',
thirdDynamicPart: 'something'
}],
};
Thanks
if i have /course/:category/:course and do the mapping like
this outputs:
rather than:
how would i do the second one or is it not possible at the moment??
also could this work for longer urls as i have some that have 3 or 4 dynamic urls