OK, this is rather a tricky one.

1) the CSS resource is loaded from the resources workspace /resources/ templating-kit/themes/<mytheme>/style.css 2) the relative path points obviously to /stk-resources/site/resources/ templating-kit/themes/<mytheme>/img/layout/navigation.jpg 3) this path is translated by a virtual uri mapping (theme-img-to-dms) to /dms/templating-kit/themes/<mytheme>/img/layout/navigation.jpg

But this works only if the pattern matches .*/img/.* which isn't case for you: /images/

Note: in the theme configuration one can also point to a css file laying in the normal classpath resources (use then /.resources). In this case the relative paths will not underlay any magic. This bypasses some of the features of the resource workspace but in many cases they are anyway not needed (site awareness, processing, ...).

I hope this clarifies it.

On 14.09.2009, at 14:56, Andreas Weder wrote:


Hi,

how do I properly specify a URL to e.g. a background image in a CSS served
by STK?

I currently use something in the line of:

   #nav-global {
       background-image:url(../images/layout/navigation.jpg);
   }

which also what the default template uses. I configured a new theme along
the default "pop" theme. I'm also holding my images in the DMS.

The resulting image URL generated seems to be:

http://localhost:8080/stk-resources/site/resources/templating-kit/themes/ <my
theme>/images/layout/navigation.jpg

according to Firefox, but no resource is at the URL. A correct URL would
have been:

http://localhost:8080/dms/templating-kit/themes/<my
theme>/images/layout/navigation.jpg

I'm using Mgnl 4.1 and STK 1.1 on OS X 10.5 using Tomcat 5.5.

Is this maybe a caching problem? Since I'm developing currently I've
disabled any subscriber, so no activation takes place, and I guess no
caching either.

Thanks
Andreas


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Best regards,

Philipp Bärfuss
Magnolia International Ltd.

---------------------------------------
 Meet us at the Magnolia Conference
 http://www.magnolia-cms.com/conference
---------------------------------------

Magnolia®  - Simple Open Source Content Management


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to