Hash Routing Example with Templates

v2.1.0 of Anvil Extras includes some new features in the routing module that are super cool, making it very easy to change the main form based on the URL, a process that previously required jumping through more hoops. The new features also make it easy to make sure the user is logged in for certain URL bases.

This clone is an example of using these new features to create a site that has a public area, a users area, and an admin area. The main form for each of these areas is different (e.g. the sidebar links and top navigation links are different between them), and each has a different authorization level. It could serve as a basis for new apps that use hash routing, or as an example for retrofitting the techniques into an existing app.

https://anvil.works/build#clone:DTCVV32XON5IEF24=TAI5S6GFWVB64I75SCXVQKZW

8 Likes

A post was merged into an existing topic: Weird error Lookup Error: URL

I can confirm that happens with the original app, too. Nothing’s changed in it, so I can only assume something changed with the Anvil Extras version it was depending on. I updated it to depend on a newer version, and it now runs fine. So in your clone, change the Anvil Extras dependency to 2.7 and it should be fine.