It's a rather unusual request, but is it possible to extract a subdomain to a variable?
e.g.
(1) sub1.mydomain.com
(2) sub2.mydomain.com
When I click on (1) I want to save "sub1" and vice versa. I use plone (python and tal). Thx for your input.