Hans, I started out using an .adp file for my home page. I then embedded a couple of functions into it to display the user name and a list of user groups. Then I re-wrote it as a .tcl file. I've linked to both those files here so you can examine the differences -- it may be useful to you.
Note: I've replaced the angle brackets in the .adp file with curly brackets to keep it from being interpreted...
index.adp
index.tcl
The .tcl file produces, of course, the site home page.