Question regarding theme change

4 messages Options
Embed this post
Permalink
serpentslang

Question regarding theme change

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Is there any way to change theme depending upon the request coming. For example, if my request coming from Iphone safari browser, I want to use different theme (which is more compatible with Iphone screen). Can anyone guide me how to do this ?

 

-Owais

mraible

Re: Question regarding theme change

Reply Threaded More More options
Print post
Permalink
If you look in the decorators/default.jsp, you'll see the logic used
to select the theme. You should be able to easily change that logic to
read from a variable you set in the session or request.

On Fri, Oct 9, 2009 at 7:26 AM, owais <[hidden email]> wrote:
> Is there any way to change theme depending upon the request coming. For
> example, if my request coming from Iphone safari browser, I want to use
> different theme (which is more compatible with Iphone screen). Can anyone
> guide me how to do this ?
>
>
>
> -Owais

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

harps

Re: Question regarding theme change

Reply Threaded More More options
Print post
Permalink
You may also consider adding the following

<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="<c:url value='/styles/myiPhoneStyleSheet.css'/>">

Particularly, on the login screen where you might not have a session variable set.

P.S. Don't forget to set your viewport details on iPhone, something like the following
<meta name = "viewport" content = "width = max-width">
<meta name = "viewport" content = "initial-scale = 1.0">


mraible wrote:
If you look in the decorators/default.jsp, you'll see the logic used
to select the theme. You should be able to easily change that logic to
read from a variable you set in the session or request.

On Fri, Oct 9, 2009 at 7:26 AM, owais <owais@preceptglobalaccess.com> wrote:
> Is there any way to change theme depending upon the request coming. For
> example, if my request coming from Iphone safari browser, I want to use
> different theme (which is more compatible with Iphone screen). Can anyone
> guide me how to do this ?
>
>
>
> -Owais

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@appfuse.dev.java.net
For additional commands, e-mail: users-help@appfuse.dev.java.net
harps

Re: Question regarding theme change

Reply Threaded More More options
Print post
Permalink
In reply to this post by mraible
You may also consider adding the following

<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="<c:url value='/styles/myiPhoneStyleSheet.css'/>">

Particularly, on the login screen where you might not have a session variable set.

P.S. Don't forget to set your viewport details on iPhone, something like the following
<meta name = "viewport" content = "width = max-width">
<meta name = "viewport" content = "initial-scale = 1.0">


mraible wrote:
If you look in the decorators/default.jsp, you'll see the logic used
to select the theme. You should be able to easily change that logic to
read from a variable you set in the session or request.

On Fri, Oct 9, 2009 at 7:26 AM, owais <owais@preceptglobalaccess.com> wrote:
> Is there any way to change theme depending upon the request coming. For
> example, if my request coming from Iphone safari browser, I want to use
> different theme (which is more compatible with Iphone screen). Can anyone
> guide me how to do this ?
>
>
>
> -Owais

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@appfuse.dev.java.net
For additional commands, e-mail: users-help@appfuse.dev.java.net