开发者

Sharepoint 2007 - link to individual sites' images in CSS

开发者 https://www.devze.com 2023-02-19 06:33 出处:网络
I am trying to link to a image stored in the Images library of an individual site collection. I am able to link to images in the root site collection folder using url(../../Images/imagename.ext), ho

I am trying to link to a image stored in the Images library of an individual site collection.

I am able to link to images in the root site collection folder using url(../../Images/imagename.ext), however I want to link to the individual sites Images library, without directly inserting the site name.

I know this can be done easily enough in a page layout, using a dynamic token #SPUrl开发者_运维问答:~site

Is there an equivalent I can use in CSS?


Do your images need to change from site collection to site collection? If not, I put them into the 12\TEMPLATE\IMAGES\MyProject directory. I can then refer to the image in CSS as:

background-image: url(/_layouts/images/myproject/imagename.ext);

The virtual _layouts path insures that it will work for any depth on the server.

0

精彩评论

暂无评论...
验证码 换一张
取 消