Hi,

you can manage your resources like this. There are classes / methods to 
generate headers for CSS and JS based on a given URL:

http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/head/CssHeaderItem.html

http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/head/JavaScriptHeaderItem.html

You can use the forUrl method of both classes. 

In addition you could also mount ResourceReferences to a specific path an write 
"../mypicture.jpg" in your CSS / JS files.

See the user guide for handling resources.

kind regards

Tobias

> Am 30.01.2015 um 14:21 schrieb Nick Pratt <nbpr...@gmail.com>:
> 
> is it possible to have Wicket manage resources (.css and .js) outside of
> the classpath, so that we can leverage all the great dev/prod things that
> Wicket does with resources served from within the classpath?
> 
> We typically put our resources at the root of the context:
> /assets/css
> /assets/js
> /assets/images
> /WEB-INF/....
> 
> This way we can reference images from within our style sheets using
> 'background:url(../images/logo.png);'
> If Wicket were to serve these resources (I guess we would have to move the
> assets down a level so they were brought in to the accessible classpath of
> the Wicket app), can we manage such context sensitive references within CSS
> files that are being managed by Wicket?
> 
> We're using 6.x
> 
> N

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to