Theme based on variable

M

Mike

I would like to change the theme of the current page based
on a variable in the querystring using ASP. For example
theme=1 results in a page using theme1's them, theme=2
results in theme2's theme. Thanks.
 
J

Jim Buyens

-----Original Message-----
I would like to change the theme of the current page
based on a variable in the querystring using ASP. For
example theme=1 results in a page using theme1's them,
theme=2 results in theme2's theme. Thanks.

I don't think that's possible. I'd get rid of the Themes
and used linked style sheets instead. Then, you could
select the style sheet you want with code like this:

<head>
<%
select case Request.QueryString("theme")
case "red"
%><link rel="stylesheet" type="text/css"
href="red.css"><%
case "blue"
%><link rel="stylesheet" type="text/css"
href="grn.css"><%
case else
%><link rel="stylesheet" type="text/css"
href="grn.css"><%
end select
%>
</head>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
S

Stefan B Rusynko

Themes are design time only tools
(applied w/ CSS, so the CSS route is the way to go)




| >-----Original Message-----
| >I would like to change the theme of the current page
| >based on a variable in the querystring using ASP. For
| >example theme=1 results in a page using theme1's them,
| >theme=2 results in theme2's theme. Thanks.
|
| I don't think that's possible. I'd get rid of the Themes
| and used linked style sheets instead. Then, you could
| select the style sheet you want with code like this:
|
| <head>
| <%
| select case Request.QueryString("theme")
| case "red"
| %><link rel="stylesheet" type="text/css"
| href="red.css"><%
| case "blue"
| %><link rel="stylesheet" type="text/css"
| href="grn.css"><%
| case else
| %><link rel="stylesheet" type="text/css"
| href="grn.css"><%
| end select
| %>
| </head>
|
| Jim Buyens
| Microsoft FrontPage MVP
| http://www.interlacken.com
| Author of:
| *----------------------------------------------------
| |\---------------------------------------------------
| || Microsoft Office FrontPage 2003 Inside Out
| || Microsoft FrontPage Version 2002 Inside Out
| || Web Database Development Step by Step .NET Edition
| || Troubleshooting Microsoft FrontPage 2002
| || Faster Smarter Beginning Programming
| || (All from Microsoft Press)
| |/---------------------------------------------------
| *----------------------------------------------------
|
|
 
Top