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