You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dtra <da...@dtracorp.com> on 2007/07/12 09:06:52 UTC

use dynamic stylesheet

hi all

i'm trying to make a web application use different stylesheets based on the
url, eg. we will have different versions of the site based on the subdomain,
so the site will essentially be the same, but the layout/gui will be
different

this is what i have in my Border.java

	public IAsset getStylesheet() {
		Resource cpr = new ContextResource(new
ApplicationGlobalsImpl().getServletContext(), 
										   "/path/to/components/style1.css");
		return new ContextAsset(getBasePage()
								.getHttpServletRequest()
								.getContextPath(),
								cpr,
								new LocationImpl(cpr),
								getBasePage().getRequestCycle());
	}

in my Border.jwc Shell component spec, i have
<binding name="stylesheet" value="stylesheet"/>

the link tag that shows up in the html looks like (which is not working)
<link rel="stylesheet" type="text/css"
href="/app/path/to/components/style1.css"/>

but what i need is

<link rel="stylesheet" type="text/css"
href="/app/assets/557f2081d45a7528f898e7e384717596/path/to/components/style1.css"/>

which is how it works with the static assets

can anyone help me out?

thanks
dave
-- 
View this message in context: http://www.nabble.com/use-dynamic-stylesheet-tf4066464.html#a11554775
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use dynamic stylesheet

Posted by dtra <da...@dtracorp.com>.
oops, using tapestry 4.0.2, Hivemind 1.1.1

is it possible to disable the hash in the include url? or generate my own?
-- 
View this message in context: http://www.nabble.com/use-dynamic-stylesheet-tf4066464.html#a11571141
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org