Advanced route information erased on head page save

I have added parameters to a FW7 route, along with an event function, directly in routes.js. This works perfectly.

However, when I save the head page (eg. index.html) the route erases the additional information I added.

becomes

Screen Shot 2020-05-04 at 10.30.04 AM

bump…this is a daily issue for me. Everytime I make a change to index, I have to remember to rollback routes.js. Any workaround? @George

Unfortunately we do not support JavaScript in the routing file as we simply can’t parse And process it as JSON.

You can however do additional custom routing per view in a separate file or inline I the view seff. Check the F7 docs

EDIT: Disregard the post below…user error.

Okay, no js…how about preserving the existing path instead of overwriting that?

Right now, this:

{
    "path": "/menu_item/:feed/",
    "url": "menu_item.html"
}

gets replaced with:

{
    "path": "/menu_item/",
    "url": "menu_item.html"
}