Using different template files has already been addressed in this forum...it would be a matter of using WAP enabled templates and then pass something like t=wap, t = template set.
Well, I thought so too, but it is not that simple. The cgi output produces content-type text/html headers and I don't know how to change them according to the specific template set. The first thing I tried to do, was to make wap templates for accessing the newsletter subscription, but it is not working properly.