M
mike
Hi. I am having trouble grasping the concept of applying a consistent
theme to an ASP.net website. I didn't used to like ASP because it was
too hard to apply a theme from a common theme folder like I could do
easily in PHP, but now I see that it has some nicer theming features
and master files.
So I want to use web.config to switch which theme I'm using, and I
want to be able to have several themes. My understanding of themes is
that I can only define styling in them as I could with CSS, but I
can't define code for the header, footer, etc with them. And that's
where master files come in, right? I'd like to switch which set of
master files is in use as the theme changes. IE, I'd like to put
several master pages that match in looks but have different functions
in each theme's folder along with the skins. But I don't think that it
will automatically switch to those masters when the theme is switched
in web.config. Can I use a variable in the <%@ Page
MasterPageFile="... part? Specifically, can I include Page.Theme into
the middle of a path, like:
<%@ Page MasterPageFile="App_Themes/{Page.Theme}/m1.master" %>
I can't make the themes very varied if all I can edit is the skins and
they all have the same xHTML code.
Also, what is the difference between global themes in the /Themes/
directory and page themes in the /App_Themes/ directory?
So is this possible? Or am I thinking along the wrong lines to do such
a thing?
-Mike PII
theme to an ASP.net website. I didn't used to like ASP because it was
too hard to apply a theme from a common theme folder like I could do
easily in PHP, but now I see that it has some nicer theming features
and master files.
So I want to use web.config to switch which theme I'm using, and I
want to be able to have several themes. My understanding of themes is
that I can only define styling in them as I could with CSS, but I
can't define code for the header, footer, etc with them. And that's
where master files come in, right? I'd like to switch which set of
master files is in use as the theme changes. IE, I'd like to put
several master pages that match in looks but have different functions
in each theme's folder along with the skins. But I don't think that it
will automatically switch to those masters when the theme is switched
in web.config. Can I use a variable in the <%@ Page
MasterPageFile="... part? Specifically, can I include Page.Theme into
the middle of a path, like:
<%@ Page MasterPageFile="App_Themes/{Page.Theme}/m1.master" %>
I can't make the themes very varied if all I can edit is the skins and
they all have the same xHTML code.
Also, what is the difference between global themes in the /Themes/
directory and page themes in the /App_Themes/ directory?
So is this possible? Or am I thinking along the wrong lines to do such
a thing?
-Mike PII