Re: CSS link problem
Re: CSS link problem
- Subject: Re: CSS link problem
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 26 Apr 2004 17:42:54 -0500
What did you want? That is exactly what WOResourceURL does, print
out the URL to a resource. So if that's not exactly what you wanted,
what did you want? The code as you show it seems like it should work
to me, although putting the <WEBOBJECT> tag inside attribute quotes
like that is considered bad form by some (including the WOBuilder
validator).
Another way to do this, perhaps what you want, is:
.html:
<WEBOBJECT NAME=StylesheetLink1>
.wod:
StylesheetLink1: WOGenericElement {
elementName = "LINK";
rel = "stylesheet";
type = "text/css";
name = "test"; //unneccesary
href = stylesheetHref;
}
.java:
public String stylesheetHref() {
WOResourceManager rm = application().resourceManager();
return rm.urlForResourceNamed("nameOfStylesheet.css",
"FrameworkOrNull", null, context().request());
}
--Jonathan
At 6:31 PM -0400 4/26/04, Randall Perry wrote:
Followed someone's advice on the list of putting stylesheet in Web Server
Resources and adding a WOResourceUrl to a WO Builder page pointing to the
stylesheet, then referencing that in the href of the css link:
<link rel="stylesheet" href="<WEBOBJECT NAME=ResourceURL1></WEBOBJECT>"
type="text/css" name="test">
This works fine, insofar as the page displays the styles properly. But,
where I place the WOResourceUrl it prints out the URL to the style sheet.
Not exactly what I wanted :-P
What's the deal?
--
Randall Perry
sysTame
Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales
http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.