url param for routing options
pass JSON-encoded routing options in the url param `routing_opts`, they are passed along verbatim as an override
This commit is contained in:
parent
55b90f235c
commit
b9c1695463
1 changed files with 9 additions and 1 deletions
|
@ -792,7 +792,15 @@ c3nav = {
|
||||||
c3nav._maybe_load_site_update(e.state);
|
c3nav._maybe_load_site_update(e.state);
|
||||||
},
|
},
|
||||||
load_state: function (state, nofly) {
|
load_state: function (state, nofly) {
|
||||||
console.log(window.location);
|
const route_options_str = new URLSearchParams(window.location.search).get('route_opts');
|
||||||
|
if (route_options_str) {
|
||||||
|
try {
|
||||||
|
c3nav.next_route_options = JSON.parse(route_options_str);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (state.modal) {
|
if (state.modal) {
|
||||||
history.back();
|
history.back();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue