I think this could be done in HTTP-similar way. Where we can specify a route/path with parameters. E.g.
Where <!sql> is a function that maps the route with a specific SQL query in a file.
For example:
/sql/users/list.sql
SELECT * FROM users
/sql/users/get.sql
SELECT * FROM users WHERE id = :id
/public/users/index.htex
<ul>
<!for user in <!sql /users/list>>
<li><a href="/users/<!get user.id>/"><!get user.name></a></li>
<!end>
</ul>
/public/users/_.htex
<!set user <!sql /users/get id=<!get _>>>
<p>Name: <!get user.name></p>
<p>Email: <!get user.email></p>
I think this could be done in HTTP-similar way. Where we can specify a route/path with parameters. E.g.
Where
<!sql>is a function that maps the route with a specific SQL query in a file.For example: