support-internetgeeks.co
-
3/17/2009 10:20:31 AM
Changing webpart configuration in templates?
Hi,
I’d like to apologise in advance if this is a very basic problem that everybody knows how to resolve.
I have a template which is shared across multiple pages on a site. The template contains has an image applied to a particular div using a background image defined within a stylesheet. This works fine. The problem is that the image needs to change depending on the page that the user is looking at. We originally (and rather naively) tried to add a “Head HTML Code” webpart to the template with some css which changed the background image. Obviously however as the webpart was applied to a shared template, the background image was the same across all pages. The only solution that we can think of is to include some JavaScript in the template which changes the image depending on the URL. This however doesn’t seem like a very “clean” way of approaching the problem.
Basically we want a template which is shared across multiple pages, but each page includes a different piece of CSS to change an image.
Have we attacked this problem incorrectly? Or does someone have a solution?
Thanks in advance.
|