Skins and Images

J

Jerad Rose

I must be missing something, because this seems like it should be so obvious
(and maybe it is).

All I'm trying to do is create various skins for my site, with each skin
containing a list of 30 some odd static images. In my page, I want to set
the skin for the page, and then each image to be loaded from that skin's
folder. That's all.

For example, my page might look something like this:

<img src="[SkinFolder]/top.gif">
<img src="[SkinFolder]/logo.gif">
<img src="[SkinFolder]/bottom.gif">

I would have 4 folders set up for skins, each of them containing these
images (but each skin would have a different theme, of course). If I set my
page-level skin to Skin1, it would pull images from Skin1's folder.

I've read about skins on MSDN, newsgroups, and searching the web, but I
can't find any answers to this seemingly simple dilemma. Most of the
articles discuss using skins for setting themes on server-side controls. I
also considered the possibility that I should somehow be using CSS for this,
but CSS seems only appropriate for background images.

Thanks in advance for any direction provided.

Jerad
 
A

Alan Silver

Jerad Rose said:
I must be missing something, because this seems like it should be so obvious
(and maybe it is).

I think you are missing the way that skins work. They are an integrated
part of themes, not something completely separate as you seem to think.
All I'm trying to do is create various skins for my site, with each skin
containing a list of 30 some odd static images. In my page, I want to set
the skin for the page, and then each image to be loaded from that skin's
folder. That's all.

For example, my page might look something like this:

<img src="[SkinFolder]/top.gif">
<img src="[SkinFolder]/logo.gif">
<img src="[SkinFolder]/bottom.gif">

Are these skin folders hard-coded? If so, then you haven't gained
anything as you might just as well have typed <img
src="/images/top.gif"> etc.

You can do something like...

<img src="<%=Page.Theme %>/top.gif">

(air code, so check exact syntax), but that's a pain as you have to do
it for every image.
I would have 4 folders set up for skins, each of them containing these
images (but each skin would have a different theme, of course). If I set my
page-level skin to Skin1, it would pull images from Skin1's folder.

I've read about skins on MSDN, newsgroups, and searching the web, but I
can't find any answers to this seemingly simple dilemma. Most of the
articles discuss using skins for setting themes on server-side controls.

And? All you have to do is make the <img> tags server side image
controls, then you can set a skin for the page and the images will be
loaded from the appropriate folder.
I
also considered the possibility that I should somehow be using CSS for this,
but CSS seems only appropriate for background images.

I wouldn't say "only," but certainly mainly.
Thanks in advance for any direction provided.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top