I need to use router called EN to access a page X, but I also need to be able to access the page X with another router called CS. (EDIT: by access I mean use the ok() function, I need to view the content of the page X on different routers)
Why can I just route to the router’s children? It is a common practice on websites to use router anywhere, not creating individual pages for each router, that would be insane. I can’t be duplicating it…
Or is this possible and I am just missing something?
export function en_Router(request) {
const suffix = request.path[0]
return suffix === “home” ? ok(“HOME”) :
suffix === “consulting” ? ok(“CONSULTING”) :
suffix === “company” ? ok(“O NÁS”) :
suffix === “” ? ok(“HOME”) :
returnPage(“404”)
}
export function cs_Router(request) {
const suffix = request.path[0]
return suffix === “home” ? ok(“HOME”) :
suffix === “poradenstvi” ? ok(“CONSULTING”) :
suffix === “o-nas” ? ok(“O NÁS”) :
suffix === “” ? redirect(“/home”) :
returnPage(“404”)
}