[Zope-CMF] Redirection of mobile users

Dieter Maurer dieter@handshake.de
Fri, 3 Jan 2003 20:02:36 +0100


chad nantais wrote at 2003-1-3 04:59 -0500:
 > I want to perform redirection of mobile users to a 'Mobile' skin that is 
 > stripped down.
 > 
 > I want this function to be performed before any object in my portal is 
 > called, in case a mobile user calls an object like an article.
 > 
 > I am going to use this bit of python in my main_template skin to detect if 
 > the user is a non-PC user:
 >   python:request.HTTP_USER_AGENT[:7]!='Mozilla'
 > 
 > Any suggestions on how to have the skin change to 'Mobile' if the above 
 > condition is met, before the page fully loads in its generic skin?
I would use a SiteAccess AccessRule and the method to change the
skin (I think, it is "changeSkin", but I am not sure -- look at the source).


Dieter